QR decomposition of a matrix.
This function performs QR decomposition. That is, given a
matrix A, qr_decomp computes the QR factorization of A with column pivoting, such that
. The resulting QRdecomp object contains three matrices, QR, tau, and pivot. The upper triangle of QR contains the min(
,
) by
upper trapezoidal matrix
, while tau and the elements of QR below the diagonal represent the orthogonal matrix
as a product of min(
,
) elementary reflectors. The vector pivot is a permutation vector containing information about the pivoting strategy used in the factorization.
- Note:
- This function requires BLAS/LAPACK functionality and is only available on machines that provide these libraries. Make sure you enable the SCYTHE_LAPACK preprocessor flag if you wish to use this function. Furthermore, note that this function takes and returns only column-major concrete matrices. Future versions of Scythe will provide a native C++ implementation of this function with support for general matrix templates.
- Parameters:
-
- See also:
- QRdecomp
-
lu_decomp(Matrix<T,PO1,PS1>, Matrix<T,PO2,Concrete>&, Matrix<T,PO3,Concrete>&, Matrix<unsigned int, PO4, Concrete>&)
-
cholesky (const Matrix<T, PO, PS>&)
-
qr_solve (const Matrix<>& A, const Matrix<>& b, const QRdecomp& QR)
-
qr_solve (const Matrix<>& A, const Matrix<>& b);
- Exceptions:
-
References scythe::Matrix< T_type, ORDER, STYLE >::getArray(), scythe::Matrix_base< ORDER, STYLE >::isNull(), and SCYTHE_CHECK_10.