#include <QR_Lapack.h>
Public Member Functions | |
const Vector< Cols, int > & | get_P () |
const Matrix< square_Size, square_Size, Precision, ColMajor > & | get_Q () |
Return Q. | |
const Matrix< Rows, Cols, Precision, ColMajor > & | get_R () |
Return R. | |
template<int R, int C, class P , class B > | |
QR_Lapack (const Matrix< R, C, P, B > &m, bool p=0) | |
Private Member Functions | |
void | compute () |
int | square_size () |
Private Attributes | |
Matrix< Rows, Cols, Precision, ColMajor > | copy |
bool | do_pivoting |
Vector< Cols, int > | pivot |
Matrix< square_Size, square_Size, Precision, ColMajor > | Q |
Vector< square_Size, Precision > | tau |
Static Private Attributes | |
static const int | square_Size = (Rows>=0 && Cols>=0)?(Rows<Cols?Rows:Cols):Dynamic |
Performs QR decomposition.
The QR decomposition operates on a matrix A. It can be performed with or without column pivoting. In general:
Where is a permutation matrix constructed to permute the columns of A. In practise, is stored as a vector of integer elements.
With column pivoting, the elements of the leading diagonal of will be sorted from largest in magnitude to smallest in magnitude.
Definition at line 31 of file QR_Lapack.h.
TooN::QR_Lapack< Rows, Cols, Precision >::QR_Lapack | ( | const Matrix< R, C, P, B > & | m, | |
bool | p = 0 | |||
) | [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 |
Definition at line 42 of file QR_Lapack.h.
void TooN::QR_Lapack< Rows, Cols, Precision >::compute | ( | ) | [inline, private] |
Definition at line 72 of file QR_Lapack.h.
const Vector<Cols, int>& TooN::QR_Lapack< Rows, Cols, Precision >::get_P | ( | ) | [inline] |
Return the permutation vector. The definition is that column of A is column of .
Definition at line 65 of file QR_Lapack.h.
const Matrix<square_Size, square_Size, Precision, ColMajor>& TooN::QR_Lapack< Rows, Cols, Precision >::get_Q | ( | ) | [inline] |
Return Q.
Definition at line 58 of file QR_Lapack.h.
const Matrix<Rows, Cols, Precision, ColMajor>& TooN::QR_Lapack< Rows, Cols, Precision >::get_R | ( | ) | [inline] |
Return R.
Definition at line 52 of file QR_Lapack.h.
int TooN::QR_Lapack< Rows, Cols, Precision >::square_size | ( | ) | [inline, private] |
Definition at line 139 of file QR_Lapack.h.
Matrix<Rows, Cols, Precision, ColMajor> TooN::QR_Lapack< Rows, Cols, Precision >::copy [private] |
Definition at line 132 of file QR_Lapack.h.
bool TooN::QR_Lapack< Rows, Cols, Precision >::do_pivoting [private] |
Definition at line 137 of file QR_Lapack.h.
Vector<Cols, int> TooN::QR_Lapack< Rows, Cols, Precision >::pivot [private] |
Definition at line 135 of file QR_Lapack.h.
Matrix<square_Size, square_Size, Precision, ColMajor> TooN::QR_Lapack< Rows, Cols, Precision >::Q [private] |
Definition at line 133 of file QR_Lapack.h.
const int TooN::QR_Lapack< Rows, Cols, Precision >::square_Size = (Rows>=0 && Cols>=0)?(Rows<Cols?Rows:Cols):Dynamic [static, private] |
Definition at line 34 of file QR_Lapack.h.
Vector<square_Size, Precision> TooN::QR_Lapack< Rows, Cols, Precision >::tau [private] |
Definition at line 134 of file QR_Lapack.h.