2.3 KiB
FactorizationQR
Computes the QR factorization of a general m-by-n matrix: A = Q * R. LAPACK function GEQRF.
Computing for type matrix
bool matrix::FactorizationQR(
bool reduced, // calculation mode reduced or complete
matrix& Q, // orthogonal matrix Q
matrix& R // upper triangular matrix R
);
Computing for type matrix
bool matrix::FactorizationQR(
bool reduced, // calculation mode reduced or complete
matrixf& Q, // orthogonal matrix Q
matrixf& R // upper triangular matrix R
);
Computing for type matrix
bool matrix::FactorizationQR(
bool reduced, // calculation mode reduced or complete
matrixc& Q, // unitary matrix Q
matrixc& R // upper triangular matrix R
);
Computing for type matrix
bool matrix::FactorizationQR(
bool reduced, // calculation mode reduced or complete
matrixcf& Q, // unitary matrix Q
matrixcf& R // upper triangular matrix R
);
Parameters
reduced
[in] Calculation mode. If reduced is true then matrices Q, R calculated with dimensions (M, K), (K, N). If reduced is false it means complete calculation of matrices Q, R with dimensions (M,M), (M,N).
Q
[out] Orthogonal or unitary matrix Q.
R
[out] Upper triangular matrix R.
Return Value
Return true if successful, otherwise false in case of an error.
Note
If reduced is true
If m >= n, matrix Q is of m-by-n sizes, matrix R is of n-by-n sizes.
If m < n, matrix Q is of m-by-m sizes, matrix R is of m-by-n sizes.
If reduced is false, matrix Q is of m-by-m sizes, matrix R is of m-by-n sizes.