TooN
Classes | Functions
Matrix decompositions

Classes to perform matrix decompositions, used to solve linear equations and provide information about matrices. More...

Classes

class  TooN::Cholesky< Size, Precision >
 Decomposes a positive-semidefinite symmetric matrix A (such as a covariance) into L*D*L^T, where L is lower-triangular and D is diagonal. More...
 
class  TooN::Lapack_Cholesky< Size, Precision >
 Decomposes a positive-semidefinite symmetric matrix A (such as a covariance) into L*L^T, where L is lower-triangular. More...
 
class  TooN::LU< Size, Precision >
 Performs LU decomposition and back substitutes to solve equations. More...
 
class  TooN::QR< Rows, Cols, Precision >
 Performs QR decomposition. More...
 
class  TooN::QR_Lapack< Rows, Cols, Precision >
 Performs QR decomposition. More...
 
struct  TooN::SQSVD< Size, Precision >
 version of SVD forced to be square princiapally here to allow use in WLS More...
 
class  TooN::SymEigen< Size, Precision >
 Performs eigen decomposition of a matrix. More...
 
class  TooN::GR_SVD< M, N, Precision, WANT_U, WANT_V >
 Performs SVD and back substitute to solve equations. More...
 
class  TooN::SVD< Rows, Cols, Precision >
 Performs SVD and back substitute to solve equations. More...
 

Functions

template<int R, int C, class Precision , class Base >
void TooN::gauss_jordan (Matrix< R, C, Precision, Base > &m)
 Perform Gauss-Jordan reduction on m. More...
 
Matrix< 2 > TooN::inv (const Matrix< 2 > &m)
 Invert a matrix. More...
 

Detailed Description

Classes to perform matrix decompositions, used to solve linear equations and provide information about matrices.

Some of these are wrappers around LAPACK, others are built in. provided by the LAPACK library.

Function Documentation

◆ gauss_jordan()

template<int R, int C, class Precision , class Base >
void TooN::gauss_jordan ( Matrix< R, C, Precision, Base > &  m)

Perform Gauss-Jordan reduction on m.

If m is of the form \([A | I ]\), then after reduction, m will be \([ I | A^{-1}]\). There is no restriction on the input, in that the matrix augmenting A does not need to be I, or square. The reduction is performed using elementary row operations and partial pivoting.

Parameters
mThe matrix to be reduced.

◆ inv()

Matrix<2> TooN::inv ( const Matrix< 2 > &  m)
inline

Invert a matrix.

For sizes other than 2x2, decompositions provide a suitable solition.

Parameters
mMatrix to invert.