TooN::QR_Lapack< Rows, Cols, Precision > Class Template Reference
[Matrix decompositions]

#include <QR_Lapack.h>

List of all members.

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

Detailed Description

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
class TooN::QR_Lapack< Rows, Cols, Precision >

Performs QR decomposition.

Warning:
this will only work if the number of columns is greater than the number of rows!

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.

Definition at line 31 of file QR_Lapack.h.


Constructor & Destructor Documentation

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
template<int R, int C, class P , class B >
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.

Parameters:
m The matrix to decompose
p Whether or not to perform pivoting

Definition at line 42 of file QR_Lapack.h.


Member Function Documentation

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
void TooN::QR_Lapack< Rows, Cols, Precision >::compute (  )  [inline, private]

Definition at line 72 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
const Vector<Cols, int>& TooN::QR_Lapack< Rows, Cols, Precision >::get_P (  )  [inline]

Return the permutation vector. The definition is that column $i$ of A is column $P(i)$ of $QR$.

Definition at line 65 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
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.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
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.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
int TooN::QR_Lapack< Rows, Cols, Precision >::square_size (  )  [inline, private]

Definition at line 139 of file QR_Lapack.h.


Member Data Documentation

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
Matrix<Rows, Cols, Precision, ColMajor> TooN::QR_Lapack< Rows, Cols, Precision >::copy [private]

Definition at line 132 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
bool TooN::QR_Lapack< Rows, Cols, Precision >::do_pivoting [private]

Definition at line 137 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
Vector<Cols, int> TooN::QR_Lapack< Rows, Cols, Precision >::pivot [private]

Definition at line 135 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
Matrix<square_Size, square_Size, Precision, ColMajor> TooN::QR_Lapack< Rows, Cols, Precision >::Q [private]

Definition at line 133 of file QR_Lapack.h.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
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.

template<int Rows = Dynamic, int Cols = Rows, class Precision = double>
Vector<square_Size, Precision> TooN::QR_Lapack< Rows, Cols, Precision >::tau [private]

Definition at line 134 of file QR_Lapack.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Friends Defines


libtoon
Author(s): Florian Weisshardt
autogenerated on Fri Jan 11 10:09:49 2013