![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
QR decomposition helpers used by the experimental SVD and polar decomposition code. More...
Include dependency graph for QR_decomp.h:Go to the source code of this file.
Functions | |
| void | QR_dec (double *A, double *Q, double *R, int rows, int cols) |
| Decompose a dense matrix into an orthonormal basis and an upper-triangular factor. | |
QR decomposition helpers used by the experimental SVD and polar decomposition code.
The implementation uses a classical Gram-Schmidt orthonormalization on the column vectors of the input matrix. This file is currently header-only because the prototype code was imported as a self-contained module.
Decompose a dense matrix into an orthonormal basis and an upper-triangular factor.
The input matrix is interpreted as a row-major rows x cols array. The implementation copies one column at a time into Q, removes the projection on the previously orthonormalized columns, then stores the corresponding coefficients into R.
| [in] | A | Input matrix stored row-major. |
| [out] | Q | Output orthonormal basis, stored row-major with the same shape as A. |
| [out] | R | Output upper-triangular matrix, stored row-major as a cols x cols matrix. |
| [in] | rows | Number of rows in A and Q. |
| [in] | cols | Number of columns in A, Q and R. |