Linear
Linear::Cholesky< T, N, Flags > Struct Template Reference

Struct for Cholesky decomposition. More...

#include <Decomp.h>

Public Member Functions

template<size_t P, size_t Q, unsigned int Flags2>
 Cholesky (const Matrix< T, P, Q, Flags2 > &A)
 Constructor. More...
 
template<size_t P, size_t Q, unsigned int Flags2>
void Compute (const Matrix< T, P, Q, Flags2 > &A)
 Computes the Cholesky decomposition. More...
 

Public Attributes

SquareMatrix< T, N, Flags > L
 
SquareMatrix< T, N, Flags > D
 
SquareMatrix< T, N, Flags > Lh
 

Detailed Description

template<typename T, size_t N, unsigned int Flags = 0>
struct Linear::Cholesky< T, N, Flags >

Struct for Cholesky decomposition.

This struct finds NxN matrix L and NxN matrix D such that \(A=LDL^*\), L is lower unit triangular and D is diagonal.

Parameters
TType to store matrix entries as.
NNumber of rows/columns for L and D (both square). Dynamic is allowed for N.
FlagsFlags to pass to the matrices (default = row major).

Constructor & Destructor Documentation

◆ Cholesky()

template<typename T , size_t N, unsigned int Flags = 0>
template<size_t P, size_t Q, unsigned int Flags2>
Linear::Cholesky< T, N, Flags >::Cholesky ( const Matrix< T, P, Q, Flags2 > &  A)
inline

Constructor.

Just calls Compute.

Parameters
APxQ Matrix

Member Function Documentation

◆ Compute()

template<typename T , size_t N, unsigned int Flags = 0>
template<size_t P, size_t Q, unsigned int Flags2>
void Linear::Cholesky< T, N, Flags >::Compute ( const Matrix< T, P, Q, Flags2 > &  A)
inline

Computes the Cholesky decomposition.

If A is not square or Q != N, then an exception is thrown. This process may fail if A is not a Hermitian positive-definite matrix.

Parameters
APxQ Matrix

Member Data Documentation

◆ D

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::Cholesky< T, N, Flags >::D

Diagonal

◆ L

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::Cholesky< T, N, Flags >::L

Lower unit triangular

◆ Lh

template<typename T , size_t N, unsigned int Flags = 0>
SquareMatrix<T,N,Flags> Linear::Cholesky< T, N, Flags >::Lh

Lh=ConjugateTranspose(L)


The documentation for this struct was generated from the following file: