A Cholesky factorization and solver based on Cholmod. More...
#include <CholmodSupport.h>
Public Types | |
enum | { UpLo = _UpLo } |
typedef MatrixType | CholMatrixType |
typedef MatrixType::Index | Index |
typedef _MatrixType | MatrixType |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
Public Member Functions | |
template<typename Rhs , typename Dest > | |
void | _solve (const MatrixBase< Rhs > &b, MatrixBase< Dest > &dest) const |
template<typename RhsScalar , int RhsOptions, typename RhsIndex , typename DestScalar , int DestOptions, typename DestIndex > | |
void | _solve (const SparseMatrix< RhsScalar, RhsOptions, RhsIndex > &b, SparseMatrix< DestScalar, DestOptions, DestIndex > &dest) const |
void | analyzePattern (const MatrixType &matrix) |
cholmod_common & | cholmod () |
CholmodDecomposition () | |
CholmodDecomposition (const MatrixType &matrix) | |
Index | cols () const |
void | compute (const MatrixType &matrix) |
template<typename Stream > | |
void | dumpMemory (Stream &s) |
void | factorize (const MatrixType &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. | |
Index | rows () const |
void | setMode (CholmodMode mode) |
template<typename Rhs > | |
const internal::solve_retval < CholmodDecomposition, Rhs > | solve (const MatrixBase< Rhs > &b) const |
template<typename Rhs > | |
const internal::sparse_solve_retval < CholmodDecomposition, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
~CholmodDecomposition () | |
Protected Attributes | |
int | m_analysisIsOk |
cholmod_common | m_cholmod |
cholmod_factor * | m_cholmodFactor |
int | m_factorizationIsOk |
ComputationInfo | m_info |
bool | m_isInitialized |
A Cholesky factorization and solver based on Cholmod.
This class allows to solve for A.X = B sparse linear problems via a LL^T or LDL^T Cholesky factorization using the Cholmod library. The sparse matrix A must be selfajoint and positive definite. The vectors or matrices X and B can be either dense or sparse.
_MatrixType | the type of the sparse matrix A, it must be a SparseMatrix<> |
_UpLo | the triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |
Definition at line 164 of file CholmodSupport.h.
typedef MatrixType CholmodDecomposition< _MatrixType, _UpLo >::CholMatrixType |
Definition at line 171 of file CholmodSupport.h.
typedef MatrixType::Index CholmodDecomposition< _MatrixType, _UpLo >::Index |
Definition at line 172 of file CholmodSupport.h.
typedef _MatrixType CholmodDecomposition< _MatrixType, _UpLo >::MatrixType |
Definition at line 167 of file CholmodSupport.h.
typedef MatrixType::RealScalar CholmodDecomposition< _MatrixType, _UpLo >::RealScalar |
Definition at line 170 of file CholmodSupport.h.
typedef MatrixType::Scalar CholmodDecomposition< _MatrixType, _UpLo >::Scalar |
Definition at line 169 of file CholmodSupport.h.
anonymous enum |
Definition at line 168 of file CholmodSupport.h.
CholmodDecomposition< _MatrixType, _UpLo >::CholmodDecomposition | ( | ) | [inline] |
Definition at line 176 of file CholmodSupport.h.
CholmodDecomposition< _MatrixType, _UpLo >::CholmodDecomposition | ( | const MatrixType & | matrix | ) | [inline] |
Definition at line 183 of file CholmodSupport.h.
CholmodDecomposition< _MatrixType, _UpLo >::~CholmodDecomposition | ( | ) | [inline] |
Definition at line 190 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::_solve | ( | const MatrixBase< Rhs > & | b, |
MatrixBase< Dest > & | dest | ||
) | const [inline] |
Definition at line 317 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::_solve | ( | const SparseMatrix< RhsScalar, RhsOptions, RhsIndex > & | b, |
SparseMatrix< DestScalar, DestOptions, DestIndex > & | dest | ||
) | const [inline] |
Definition at line 337 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::analyzePattern | ( | const MatrixType & | matrix | ) | [inline] |
Performs a symbolic decomposition on the sparcity of matrix.
This function is particularly useful when solving for several problems having the same structure.
Definition at line 278 of file CholmodSupport.h.
cholmod_common& CholmodDecomposition< _MatrixType, _UpLo >::cholmod | ( | ) | [inline] |
Returns a reference to the Cholmod's configuration structure to get a full control over the performed operations. See the Cholmod user guide for details.
Definition at line 312 of file CholmodSupport.h.
Index CholmodDecomposition< _MatrixType, _UpLo >::cols | ( | void | ) | const [inline] |
Definition at line 197 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::compute | ( | const MatrixType & | matrix | ) | [inline] |
Computes the sparse Cholesky decomposition of matrix
Definition at line 238 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::dumpMemory | ( | Stream & | s | ) | [inline] |
Definition at line 357 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::factorize | ( | const MatrixType & | matrix | ) | [inline] |
Performs a numeric decomposition of matrix
The given matrix must has the same sparcity than the matrix on which the symbolic decomposition has been performed.
Definition at line 300 of file CholmodSupport.h.
ComputationInfo CholmodDecomposition< _MatrixType, _UpLo >::info | ( | ) | const [inline] |
Reports whether previous computation was successful.
Success
if computation was succesful, NumericalIssue
if the matrix.appears to be negative. Definition at line 231 of file CholmodSupport.h.
Index CholmodDecomposition< _MatrixType, _UpLo >::rows | ( | void | ) | const [inline] |
Definition at line 198 of file CholmodSupport.h.
void CholmodDecomposition< _MatrixType, _UpLo >::setMode | ( | CholmodMode | mode | ) | [inline] |
Definition at line 200 of file CholmodSupport.h.
const internal::solve_retval<CholmodDecomposition, Rhs> CholmodDecomposition< _MatrixType, _UpLo >::solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 250 of file CholmodSupport.h.
const internal::sparse_solve_retval<CholmodDecomposition, Rhs> CholmodDecomposition< _MatrixType, _UpLo >::solve | ( | const SparseMatrixBase< Rhs > & | b | ) | const [inline] |
Definition at line 264 of file CholmodSupport.h.
int CholmodDecomposition< _MatrixType, _UpLo >::m_analysisIsOk [protected] |
Definition at line 366 of file CholmodSupport.h.
cholmod_common CholmodDecomposition< _MatrixType, _UpLo >::m_cholmod [mutable, protected] |
Definition at line 361 of file CholmodSupport.h.
cholmod_factor* CholmodDecomposition< _MatrixType, _UpLo >::m_cholmodFactor [protected] |
Definition at line 362 of file CholmodSupport.h.
int CholmodDecomposition< _MatrixType, _UpLo >::m_factorizationIsOk [protected] |
Definition at line 365 of file CholmodSupport.h.
ComputationInfo CholmodDecomposition< _MatrixType, _UpLo >::m_info [mutable, protected] |
Definition at line 363 of file CholmodSupport.h.
bool CholmodDecomposition< _MatrixType, _UpLo >::m_isInitialized [protected] |
Definition at line 364 of file CholmodSupport.h.