TooN
|
Performs QR decomposition. More...
#include <QR_Lapack.h>
Public Member Functions | |
template<int R, int C, class P , class B > | |
QR_Lapack (const Matrix< R, C, P, B > &m, bool p=0) | |
Construct the QR decomposition of a matrix. More... | |
const Matrix< Rows, Cols, Precision, ColMajor > & | get_R () |
Return R. | |
const Matrix< square_Size, square_Size, Precision, ColMajor > & | get_Q () |
Return Q. | |
const Vector< Cols, int > & | get_P () |
Return the permutation vector. More... | |
Performs QR decomposition.
The QR decomposition operates on a matrix A. It can be performed with or without column pivoting. In general:
\[ AP = QR \]
Where \(P\) is a permutation matrix constructed to permute the columns of A. In practise, \(P\) is stored as a vector of integer elements.
With column pivoting, the elements of the leading diagonal of \(R\) will be sorted from largest in magnitude to smallest in magnitude.
|
inline |
Construct the QR decomposition of a matrix.
This initialises the class, and performs the decomposition immediately.
m | The matrix to decompose |
p | Whether or not to perform pivoting |
|
inline |
Return the permutation vector.
The definition is that column \(i\) of A is column \(P(i)\) of \(QR\).