remora::cholesky_decomposition< MatrixStorage > Class Template Reference

Lower triangular Cholesky decomposition. More...

#include <shark/LinAlg/BLAS/decompositions.hpp>

+ Inheritance diagram for remora::cholesky_decomposition< MatrixStorage >:

Public Member Functions

 cholesky_decomposition ()
 
template<class E >
 cholesky_decomposition (matrix_expression< E, device_type > const &e)
 
template<class E >
void decompose (matrix_expression< E, device_type > const &e)
 
MatrixStorage const & lower_factor () const
 
auto upper_factor () const -> decltype(trans(std::declval< MatrixStorage const &>()))
 
template<class MatB >
void solve (matrix_expression< MatB, device_type > &B, left) const
 
template<class MatB >
void solve (matrix_expression< MatB, device_type > &B, right) const
 
template<class VecB , bool Left>
void solve (vector_expression< VecB, device_type > &b, system_tag< Left >) const
 
template<class VecV >
void update (value_type alpha, value_type beta, vector_expression< VecV, device_type > const &v)
 Updates a covariance factor by a rank one update. More...
 
template<typename Archive >
void serialize (Archive &ar, const std::size_t version)
 

Detailed Description

template<class MatrixStorage>
class remora::cholesky_decomposition< MatrixStorage >

Lower triangular Cholesky decomposition.

Given an \( m \times m \) symmetric positive definite matrix \(A\), represents the lower triangular matrix \(L\) such that \(A = LL^T \).

This decomposition is a corner block of many linear algebra routines especially for solving symmetric positive definite systems of equations.

Unlike many other decompositions, this decomposition is fast, numerically stable and can be updated when the original matrix is changed (rank-k updates of the form A<-alpha A + VCV^T)

Definition at line 72 of file decompositions.hpp.

Constructor & Destructor Documentation

◆ cholesky_decomposition() [1/2]

template<class MatrixStorage>
remora::cholesky_decomposition< MatrixStorage >::cholesky_decomposition ( )
inline

Definition at line 81 of file decompositions.hpp.

◆ cholesky_decomposition() [2/2]

template<class MatrixStorage>
template<class E >
remora::cholesky_decomposition< MatrixStorage >::cholesky_decomposition ( matrix_expression< E, device_type > const &  e)
inline

Definition at line 83 of file decompositions.hpp.

Member Function Documentation

◆ decompose()

template<class MatrixStorage>
template<class E >
void remora::cholesky_decomposition< MatrixStorage >::decompose ( matrix_expression< E, device_type > const &  e)
inline

Definition at line 88 of file decompositions.hpp.

◆ lower_factor()

template<class MatrixStorage>
MatrixStorage const& remora::cholesky_decomposition< MatrixStorage >::lower_factor ( ) const
inline

◆ serialize()

template<class MatrixStorage>
template<typename Archive >
void remora::cholesky_decomposition< MatrixStorage >::serialize ( Archive &  ar,
const std::size_t  version 
)
inline

Definition at line 174 of file decompositions.hpp.

◆ solve() [1/3]

template<class MatrixStorage>
template<class MatB >
void remora::cholesky_decomposition< MatrixStorage >::solve ( matrix_expression< MatB, device_type > &  B,
left   
) const
inline

◆ solve() [2/3]

template<class MatrixStorage>
template<class MatB >
void remora::cholesky_decomposition< MatrixStorage >::solve ( matrix_expression< MatB, device_type > &  B,
right   
) const
inline

Definition at line 108 of file decompositions.hpp.

◆ solve() [3/3]

template<class MatrixStorage>
template<class VecB , bool Left>
void remora::cholesky_decomposition< MatrixStorage >::solve ( vector_expression< VecB, device_type > &  b,
system_tag< Left >   
) const
inline

Definition at line 113 of file decompositions.hpp.

◆ update()

template<class MatrixStorage>
template<class VecV >
void remora::cholesky_decomposition< MatrixStorage >::update ( value_type  alpha,
value_type  beta,
vector_expression< VecV, device_type > const &  v 
)
inline

Updates a covariance factor by a rank one update.

Let \( A=LL^T \) be a matrix with its lower cholesky factor. Assume we want to update A using a simple rank-one update \( A = \alpha A+ \beta vv^T \). This invalidates L and it needs to be recomputed which is O(n^3). instead we can update the factorisation directly by performing a similar, albeit more complex algorithm on L, which can be done in O(L^2).

Alpha is not required to be positive, but if it is not negative, one has to be carefull that the update would keep A positive definite. Otherwise the decomposition does not exist anymore and an exception is thrown.

Parameters
vthe update vector
alphathe scaling factor, must be positive.
betathe update factor. it Can be positive or negative

Definition at line 134 of file decompositions.hpp.

◆ upper_factor()

template<class MatrixStorage>
auto remora::cholesky_decomposition< MatrixStorage >::upper_factor ( ) const -> decltype(trans(std::declval<MatrixStorage const&>()))
inline

Definition at line 98 of file decompositions.hpp.


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