Scythe-1.0.3
QRdecomp scythe::qr_decomp ( const Matrix<> &  A) [inline]

QR decomposition of a matrix.

This function performs QR decomposition. That is, given a $m \times n $ matrix A, qr_decomp computes the QR factorization of A with column pivoting, such that $A \cdot P = Q \cdot R$. The resulting QRdecomp object contains three matrices, QR, tau, and pivot. The upper triangle of QR contains the min( $m$, $n$) by $n$ upper trapezoidal matrix $R$, while tau and the elements of QR below the diagonal represent the orthogonal matrix $Q$ as a product of min( $m$, $n$) 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:
AA matrix to decompose.
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:
scythe_null_error(Level 1)
scythe_lapack_internal_error(Level 1)

References scythe::Matrix< T_type, ORDER, STYLE >::getArray(), scythe::Matrix_base< ORDER, STYLE >::isNull(), and SCYTHE_CHECK_10.