ARPACK-Armadillo
SymmetricLDL< Scalar > Class Template Reference

#include <SymmetricLDL.h>

Public Member Functions

 SymmetricLDL ()
 
 SymmetricLDL (const Matrix &mat, const char uplo= 'L')
 
void compute (const Matrix &mat, const char uplo= 'L')
 
void solve (Vector &vec_in, Vector &vec_out)
 

Detailed Description

template<typename Scalar = double>
class SymmetricLDL< Scalar >

Perform the LDL decomposition of a symmetric (possibly indefinite) matrix.

Template Parameters
ScalarThe element type of the matrix. Currently supported types are float and double.

This class is a wrapper of the Lapack functions _sytrf and _sytrs.

Definition at line 25 of file SymmetricLDL.h.

Constructor & Destructor Documentation

template<typename Scalar = double>
SymmetricLDL< Scalar >::SymmetricLDL ( )
inline

Default constructor to create an object that stores the LDL decomposition of a symmetric matrix. Factorization can be performed later by calling the compute() method.

Definition at line 44 of file SymmetricLDL.h.

template<typename Scalar = double>
SymmetricLDL< Scalar >::SymmetricLDL ( const Matrix &  mat,
const char  uplo = 'L' 
)
inline

Constructor to create an object that performs and stores the LDL decomposition of a symmetric matrix mat.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined.
uplo'L' to indicate using the lower triangular part of the matrix, and 'U' for upper triangular part.

Definition at line 57 of file SymmetricLDL.h.

Member Function Documentation

template<typename Scalar = double>
void SymmetricLDL< Scalar >::compute ( const Matrix &  mat,
const char  uplo = 'L' 
)
inline

Conduct the LDL factorization of a symmetric matrix.

Parameters
matMatrix type can be arma::mat or arma::fmat, depending on the template parameter Scalar defined.
uplo'L' to indicate using the lower triangular part of the matrix, and 'U' for upper triangular part.

Definition at line 73 of file SymmetricLDL.h.

template<typename Scalar = double>
void SymmetricLDL< Scalar >::solve ( Vector &  vec_in,
Vector &  vec_out 
)
inline

Use the computed LDL factorization to solve linear equation \(Ax=b\), where \(A\) is the matrix factorized.

Parameters
vec_inThe vector \(b\).
vec_outThe vector \(x\) to be solved, which will be overwritten by the calculated solution.

Vector type can be arma::vec or arma::fvec, depending on the template parameter Scalar defined.

Definition at line 113 of file SymmetricLDL.h.


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