A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod. More...
#include <CholmodSupport.h>
Public Types | |
enum | |
typedef MatrixType | CholMatrixType |
typedef MatrixType::Index | Index |
typedef _MatrixType | MatrixType |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
Public Member Functions | |
void | analyzePattern (const MatrixType &matrix) |
cholmod_common & | cholmod () |
CholmodSimplicialLLT () | |
CholmodSimplicialLLT (const MatrixType &matrix) | |
Index | cols () const |
CholmodSimplicialLLT < _MatrixType, _UpLo > & | compute (const MatrixType &matrix) |
CholmodSimplicialLLT < _MatrixType, _UpLo > & | derived () |
const CholmodSimplicialLLT < _MatrixType, _UpLo > & | derived () const |
void | dumpMemory (Stream &s) |
void | factorize (const MatrixType &matrix) |
ComputationInfo | info () const |
Reports whether previous computation was successful. | |
Index | rows () const |
const internal::solve_retval < CholmodBase, Rhs > | solve (const MatrixBase< Rhs > &b) const |
const internal::sparse_solve_retval < CholmodBase, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
~CholmodSimplicialLLT () | |
Protected Member Functions | |
void | init () |
Protected Attributes | |
int | m_analysisIsOk |
cholmod_common | m_cholmod |
cholmod_factor * | m_cholmodFactor |
int | m_factorizationIsOk |
ComputationInfo | m_info |
bool | m_isInitialized |
A simplicial direct Cholesky (LLT) factorization and solver based on Cholmod.
This class allows to solve for A.X = B sparse linear problems via a simplicial LL^T Cholesky factorization using the Cholmod library. This simplicial variant is equivalent to Eigen's built-in SimplicialLLT class. Thefore, it has little practical interest. 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. |
This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.
typedef MatrixType CholMatrixType [inherited] |
typedef MatrixType::Index Index [inherited] |
typedef _MatrixType MatrixType |
Reimplemented from CholmodBase< _MatrixType, _UpLo, CholmodSimplicialLLT< _MatrixType, _UpLo > >.
typedef MatrixType::RealScalar RealScalar [inherited] |
typedef MatrixType::Scalar Scalar [inherited] |
anonymous enum [inherited] |
CholmodSimplicialLLT | ( | ) | [inline] |
CholmodSimplicialLLT | ( | const MatrixType & | matrix | ) | [inline] |
~CholmodSimplicialLLT | ( | ) | [inline] |
void analyzePattern | ( | const MatrixType & | matrix | ) | [inline, inherited] |
Performs a symbolic decomposition on the sparcity of matrix.
This function is particularly useful when solving for several problems having the same structure.
References CholmodBase< _MatrixType, _UpLo, Derived >::m_analysisIsOk, CholmodBase< _MatrixType, _UpLo, Derived >::m_cholmod, CholmodBase< _MatrixType, _UpLo, Derived >::m_cholmodFactor, CholmodBase< _MatrixType, _UpLo, Derived >::m_factorizationIsOk, CholmodBase< _MatrixType, _UpLo, Derived >::m_info, CholmodBase< _MatrixType, _UpLo, Derived >::m_isInitialized, Eigen::Success, and Eigen::viewAsCholmod().
cholmod_common& cholmod | ( | ) | [inline, inherited] |
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.
References CholmodBase< _MatrixType, _UpLo, Derived >::m_cholmod.
CholmodSimplicialLLT< _MatrixType, _UpLo > & compute | ( | const MatrixType & | matrix | ) | [inline, inherited] |
Computes the sparse Cholesky decomposition of matrix
References CholmodBase< _MatrixType, _UpLo, Derived >::analyzePattern(), CholmodBase< _MatrixType, _UpLo, Derived >::derived(), and CholmodBase< _MatrixType, _UpLo, Derived >::factorize().
Referenced by CholmodSimplicialLLT< _MatrixType, _UpLo >::CholmodSimplicialLLT().
CholmodSimplicialLLT< _MatrixType, _UpLo > & derived | ( | ) | [inline, inherited] |
const CholmodSimplicialLLT< _MatrixType, _UpLo > & derived | ( | ) | const [inline, inherited] |
void dumpMemory | ( | Stream & | s | ) | [inline, inherited] |
void factorize | ( | const MatrixType & | matrix | ) | [inline, inherited] |
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.
References CholmodBase< _MatrixType, _UpLo, Derived >::m_analysisIsOk, CholmodBase< _MatrixType, _UpLo, Derived >::m_cholmod, CholmodBase< _MatrixType, _UpLo, Derived >::m_cholmodFactor, CholmodBase< _MatrixType, _UpLo, Derived >::m_factorizationIsOk, CholmodBase< _MatrixType, _UpLo, Derived >::m_info, Eigen::Success, and Eigen::viewAsCholmod().
ComputationInfo info | ( | ) | const [inline, inherited] |
Reports whether previous computation was successful.
Success
if computation was succesful, NumericalIssue
if the matrix.appears to be negative. References CholmodBase< _MatrixType, _UpLo, Derived >::m_info, and CholmodBase< _MatrixType, _UpLo, Derived >::m_isInitialized.
void init | ( | ) | [inline, protected] |
const internal::solve_retval<CholmodBase, Rhs> solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline, inherited] |
References CholmodBase< _MatrixType, _UpLo, Derived >::m_isInitialized, and CholmodBase< _MatrixType, _UpLo, Derived >::rows().
const internal::sparse_solve_retval<CholmodBase, Rhs> solve | ( | const SparseMatrixBase< Rhs > & | b | ) | const [inline, inherited] |
References EigenBase< Derived >::derived(), CholmodBase< _MatrixType, _UpLo, Derived >::m_isInitialized, SparseMatrixBase< Derived >::rows(), and CholmodBase< _MatrixType, _UpLo, Derived >::rows().
int m_analysisIsOk [protected, inherited] |
cholmod_common m_cholmod [mutable, protected, inherited] |
Referenced by CholmodSimplicialLLT< _MatrixType, _UpLo >::init().
cholmod_factor* m_cholmodFactor [protected, inherited] |
int m_factorizationIsOk [protected, inherited] |
ComputationInfo m_info [mutable, protected, inherited] |
bool m_isInitialized [protected, inherited] |