ANIMA  4.0
Public Types | Public Member Functions | List of all members
anima::CholeskyDecomposition Class Reference

Cholesky decomposition: decomposes a symmetric matrix A in the form L D L^T, where L is lower triangular and D diagonal. May be used to solve efficiently any linear system using the solve methods. Refer to Gill, Golub et al. Methods for modifying matrix factorizations. 1974. More...

#include <animaCholeskyDecomposition.h>

Public Types

typedef vnl_diag_matrix< double > DiagonalType
 
typedef vnl_matrix< double > MatrixType
 
typedef vnl_vector< double > VectorType
 

Public Member Functions

 CholeskyDecomposition ()
 
 CholeskyDecomposition (const unsigned int matrixDimension, const double epsilon)
 
 CholeskyDecomposition (const MatrixType &val)
 
double GetConditionNumber ()
 Get condition number from decomposition. More...
 
DiagonalTypeGetDMatrix ()
 
MatrixTypeGetInputMatrix ()
 Get input matrix, useful if decomposition updated through rank one method. More...
 
MatrixTypeGetLMatrix ()
 
void PerformDecomposition ()
 Performs LDL decomposition from input matrix. More...
 
void Recompose ()
 Recompose input matrix from LDL decomposition. More...
 
void SetDMatrix (const DiagonalType &val)
 
void SetInputMatrix (const MatrixType &matrix)
 Set input matrix to decompose. More...
 
void SetLMatrix (const MatrixType &val)
 
VectorTypeSolveLinearSystem (const VectorType &b)
 Solves linear system Ax=b and outputs result in new variable. More...
 
void SolveLinearSystemInPlace (VectorType &b)
 Solves linear system Ax=b and outputs result in input b variable. More...
 
void Update (const VectorType &x)
 Update decomposition with x so that LDL matches A + x x^T. More...
 

Detailed Description

Cholesky decomposition: decomposes a symmetric matrix A in the form L D L^T, where L is lower triangular and D diagonal. May be used to solve efficiently any linear system using the solve methods. Refer to Gill, Golub et al. Methods for modifying matrix factorizations. 1974.

Definition at line 17 of file animaCholeskyDecomposition.h.

Member Typedef Documentation

◆ DiagonalType

typedef vnl_diag_matrix<double> anima::CholeskyDecomposition::DiagonalType

Definition at line 21 of file animaCholeskyDecomposition.h.

◆ MatrixType

typedef vnl_matrix<double> anima::CholeskyDecomposition::MatrixType

Definition at line 20 of file animaCholeskyDecomposition.h.

◆ VectorType

typedef vnl_vector<double> anima::CholeskyDecomposition::VectorType

Definition at line 22 of file animaCholeskyDecomposition.h.

Constructor & Destructor Documentation

◆ CholeskyDecomposition() [1/3]

anima::CholeskyDecomposition::CholeskyDecomposition ( )
inline

Definition at line 24 of file animaCholeskyDecomposition.h.

◆ CholeskyDecomposition() [2/3]

anima::CholeskyDecomposition::CholeskyDecomposition ( const unsigned int  matrixDimension,
const double  epsilon 
)
inline

Definition at line 26 of file animaCholeskyDecomposition.h.

◆ CholeskyDecomposition() [3/3]

anima::CholeskyDecomposition::CholeskyDecomposition ( const MatrixType val)
inline

Definition at line 38 of file animaCholeskyDecomposition.h.

Member Function Documentation

◆ GetConditionNumber()

double anima::CholeskyDecomposition::GetConditionNumber ( )

Get condition number from decomposition.

Definition at line 41 of file animaCholeskyDecomposition.cxx.

◆ GetDMatrix()

DiagonalType& anima::CholeskyDecomposition::GetDMatrix ( )
inline

Definition at line 70 of file animaCholeskyDecomposition.h.

◆ GetInputMatrix()

MatrixType& anima::CholeskyDecomposition::GetInputMatrix ( )
inline

Get input matrix, useful if decomposition updated through rank one method.

Definition at line 65 of file animaCholeskyDecomposition.h.

◆ GetLMatrix()

MatrixType& anima::CholeskyDecomposition::GetLMatrix ( )
inline

Definition at line 68 of file animaCholeskyDecomposition.h.

◆ PerformDecomposition()

void anima::CholeskyDecomposition::PerformDecomposition ( )

◆ Recompose()

void anima::CholeskyDecomposition::Recompose ( )

Recompose input matrix from LDL decomposition.

Definition at line 108 of file animaCholeskyDecomposition.cxx.

◆ SetDMatrix()

void anima::CholeskyDecomposition::SetDMatrix ( const DiagonalType val)
inline

Definition at line 69 of file animaCholeskyDecomposition.h.

◆ SetInputMatrix()

void anima::CholeskyDecomposition::SetInputMatrix ( const MatrixType matrix)

◆ SetLMatrix()

void anima::CholeskyDecomposition::SetLMatrix ( const MatrixType val)
inline

Definition at line 67 of file animaCholeskyDecomposition.h.

◆ SolveLinearSystem()

CholeskyDecomposition::VectorType & anima::CholeskyDecomposition::SolveLinearSystem ( const VectorType b)

◆ SolveLinearSystemInPlace()

void anima::CholeskyDecomposition::SolveLinearSystemInPlace ( VectorType b)

Solves linear system Ax=b and outputs result in input b variable.

Definition at line 69 of file animaCholeskyDecomposition.cxx.

Referenced by SolveLinearSystem(), and anima::NNLSOptimizer::StartOptimization().

◆ Update()

void anima::CholeskyDecomposition::Update ( const VectorType x)

Update decomposition with x so that LDL matches A + x x^T.

Definition at line 87 of file animaCholeskyDecomposition.cxx.


The documentation for this class was generated from the following files: