TooN: QR_Lapack< Rows, Cols, Precision > Class Template Reference

TooN 2.0.0-beta8

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
QR_Lapack< Rows, Cols, Precision > Class Template Reference
Matrix decompositions

Performs QR decomposition. More...

`#include <QR_Lapack.h>`

List of all members.

## Public Member Functions
template<int R, int C, class P , class B >
| QR_Lapack (const Matrix< R, C, P, B > &m, bool p=0)
const Matrix< Rows, Cols, Precision, ColMajor > & | get_R ()
const Matrix< square_Size, square_Size, Precision, ColMajor > & | get_Q ()
const Vector< Cols, int > & | get_P ()

## 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:

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.

## Constructor & Destructor Documentation

QR_Lapack | ( | const Matrix< R, C, P, B > & | m,
|  | bool | p = `0`
| ) |  |

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

## Member Function Documentation

const Vector<Cols, int>& get_P | ( |  | ) |

Return the permutation vector.

The definition is that column of A is column of .