akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
linalg::Cholesky< Mat > Struct Template Reference

Factors a real positive-definite matrix as A = G G^T. More...

#include <cholesky.hpp>

Inheritance diagram for linalg::Cholesky< Mat >:
[legend]

Public Types

using SymmetricBase = SymmetricOperator< Mat, Cholesky< Mat > >
 alias for symmetric operators
 
- Public Types inherited from linalg::SymmetricOperator< Mat, Cholesky< Mat > >
using OperatorBase = Endomorphism< Mat, SymmetricOperator< Mat, Cholesky< Mat > > >
 alias to extract base types
 
- Public Types inherited from linalg::Endomorphism< Mat, Derived >
using T = matrix_scalar_t< Mat >
 alias helpers for types
 
using ScalarT = real_type_t< T >
 
using ComplexT = std::complex< ScalarT >
 

Public Member Functions

constexpr Cholesky (const Mat &A)
 Factor A as G G^T using Cholesky column updates.
 
constexpr Cholesky (const Mat &A, const config::FactorConfig< T > &config_in)
 Compute Cholesky factors with explicit settings.
 
constexpr auto G () const
 Reconstruct the lower-triangular Cholesky factor.
 
- Public Member Functions inherited from linalg::SymmetricOperator< Mat, Cholesky< Mat > >
constexpr SymmetricOperator (const Mat &A)
 CTOR.
 
constexpr auto operator() (std::size_t i, std::size_t j) const
 get element at (i,j) index
 
constexpr std::size_t index (std::size_t i, std::size_t j) const
 index from (row, col)
 
constexpr bool is_pd () const
 is pd check
 
constexpr bool is_nd () const
 is nd check
 
constexpr bool is_psd () const
 is psd check
 
constexpr bool is_nsd () const
 is nsd check
 
constexpr bool is_ind () const
 is indefinite
 
constexpr bool is_valid () const
 is valid
 
constexpr void compute_definiteness (const Vector< DiagT, N > &diag, const ScalarT &tol)
 compute definiteness
 
constexpr const Cholesky< Mat > & self () const
 self
 
- Public Member Functions inherited from linalg::Endomorphism< Mat, Derived >
constexpr const T & operator() (std::size_t i, std::size_t j) const
 get element at (i,j) index
 
constexpr T & operator() (std::size_t i, std::size_t j)
 get element at (i,j) index
 
constexpr Derived & self ()
 self
 
constexpr const Derived & self () const
 self
 

Additional Inherited Members

- Public Attributes inherited from linalg::SymmetricOperator< Mat, Cholesky< Mat > >
SymmetricOperatorType type
 member variables
 
Vector< T, DIM > svec
 
- Static Public Attributes inherited from linalg::SymmetricOperator< Mat, Cholesky< Mat > >
static constexpr std::size_t DIM
 helpers to get DIM from mat
 
- Static Public Attributes inherited from linalg::Endomorphism< Mat, Derived >
static constexpr std::size_t N = mat_rows_v<Mat>
 helper to extract N
 

Detailed Description

template<SquareMatrix Mat>
struct linalg::Cholesky< Mat >

Factors a real positive-definite matrix as A = G G^T.

forward declaration of cholesky

Template Parameters
MatReal square matrix type.

Definition at line 20 of file cholesky.hpp.

Member Typedef Documentation

◆ SymmetricBase

template<SquareMatrix Mat>
using linalg::Cholesky< Mat >::SymmetricBase = SymmetricOperator<Mat, Cholesky<Mat> >

alias for symmetric operators

Definition at line 22 of file cholesky.hpp.

Constructor & Destructor Documentation

◆ Cholesky() [1/2]

template<SquareMatrix Mat>
constexpr linalg::Cholesky< Mat >::Cholesky ( const Mat &  A)
inlineexplicitconstexpr

Factor A as G G^T using Cholesky column updates.

Parameters
[in]AReal symmetric positive-definite input matrix.

Definition at line 38 of file cholesky.hpp.

References linalg::mat_rows_v.

◆ Cholesky() [2/2]

template<SquareMatrix Mat>
constexpr linalg::Cholesky< Mat >::Cholesky ( const Mat &  A,
const config::FactorConfig< T > &  config_in 
)
inlineexplicitconstexpr

Compute Cholesky factors with explicit settings.

Parameters
[in]AReal symmetric positive-definite input matrix.
[in]config_inFactorization settings and definiteness tolerance.

Definition at line 46 of file cholesky.hpp.

References linalg::mat_rows_v.

Member Function Documentation

◆ G()

template<SquareMatrix Mat>
constexpr auto linalg::Cholesky< Mat >::G ( ) const
inlineconstexpr

Reconstruct the lower-triangular Cholesky factor.

Returns
Matrix<T, N, N> containing G such that A = G G^T.

Definition at line 57 of file cholesky.hpp.

References linalg::mat_rows_v.


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