Eigen::CholmodDecomposition< MatrixType_, UpLo_ > Class Template Reference

A general Cholesky factorization and solver based on Cholmod. More...

+ Inheritance diagram for Eigen::CholmodDecomposition< MatrixType_, UpLo_ >:

Public Types

typedef MatrixType_ MatrixType
 
- Public Types inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodDecomposition< MatrixType_, Lower > >
enum  
 
enum  
 
typedef MatrixType CholMatrixType
 
typedef MatrixType_ MatrixType
 
typedef MatrixType::RealScalar RealScalar
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::StorageIndex StorageIndex
 

Public Member Functions

 CholmodDecomposition ()
 
 CholmodDecomposition (const MatrixType &matrix)
 
void setMode (CholmodMode mode)
 
 ~CholmodDecomposition ()
 
- Public Member Functions inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodDecomposition< MatrixType_, Lower > >
void analyzePattern (const MatrixType &matrix)
 
cholmod_common & cholmod ()
 
 CholmodBase ()
 
 CholmodBase (const MatrixType &matrix)
 
StorageIndex cols () const
 
CholmodDecomposition< MatrixType_, Lower > & compute (const MatrixType &matrix)
 
Scalar determinant () const
 
void dumpMemory (Stream &)
 
void factorize (const MatrixType &matrix)
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
Scalar logDeterminant () const
 
StorageIndex rows () const
 
CholmodDecomposition< MatrixType_, Lower > & setShift (const RealScalar &offset)
 
 ~CholmodBase ()
 
- Public Member Functions inherited from Eigen::SparseSolverBase< Derived >
Derived & derived ()
 
const Derived & derived () const
 
template<typename Rhs >
const Solve< Derived, Rhs > solve (const MatrixBase< Rhs > &b) const
 
template<typename Rhs >
const Solve< Derived, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
 SparseSolverBase ()
 
 SparseSolverBase (SparseSolverBase &&other)
 
 ~SparseSolverBase ()
 

Protected Member Functions

void init ()
 
- Protected Member Functions inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodDecomposition< MatrixType_, Lower > >
CholmodDecomposition< MatrixType_, Lower > & derived ()
 
const CholmodDecomposition< MatrixType_, Lower > & derived () const
 

Private Types

typedef CholmodBase< MatrixType_, UpLo_, CholmodDecompositionBase
 

Private Attributes

cholmod_common m_cholmod
 

Additional Inherited Members

- Protected Types inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodDecomposition< MatrixType_, Lower > >
typedef SparseSolverBase< CholmodDecomposition< MatrixType_, Lower > > Base
 
- Protected Attributes inherited from Eigen::CholmodBase< MatrixType_, Lower, CholmodDecomposition< MatrixType_, Lower > >
int m_analysisIsOk
 
cholmod_common m_cholmod
 
cholmod_factor * m_cholmodFactor
 
int m_factorizationIsOk
 
ComputationInfo m_info
 
bool m_isInitialized
 
double m_shiftOffset [2]
 
- Protected Attributes inherited from Eigen::SparseSolverBase< Derived >
bool m_isInitialized
 

Detailed Description

template<typename MatrixType_, int UpLo_ = Lower>
class Eigen::CholmodDecomposition< MatrixType_, UpLo_ >

A general 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 selfadjoint and positive definite. The vectors or matrices X and B can be either dense or sparse.

This variant permits to change the underlying Cholesky method at runtime. On the other hand, it does not provide access to the result of the factorization. The default is to let Cholmod automatically choose between a simplicial and supernodal factorization.

Template Parameters
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 follows the sparse solver concept .

This class supports all kind of SparseMatrix<>: row or column major; upper, lower, or both; compressed or non compressed.

Warning
Only double precision real and complex scalar types are supported by Cholmod.
See also
Sparse solver concept

Definition at line 630 of file CholmodSupport.h.

Member Typedef Documentation

◆ Base

template<typename MatrixType_ , int UpLo_ = Lower>
typedef CholmodBase<MatrixType_, UpLo_, CholmodDecomposition> Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::Base
private

Definition at line 632 of file CholmodSupport.h.

◆ MatrixType

template<typename MatrixType_ , int UpLo_ = Lower>
typedef MatrixType_ Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::MatrixType

Definition at line 637 of file CholmodSupport.h.

Constructor & Destructor Documentation

◆ CholmodDecomposition() [1/2]

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::CholmodDecomposition ( )
inline

Definition at line 639 of file CholmodSupport.h.

639 : Base() { init(); }
CholmodBase< MatrixType_, UpLo_, CholmodDecomposition > Base

◆ CholmodDecomposition() [2/2]

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::CholmodDecomposition ( const MatrixType matrix)
inline

Definition at line 641 of file CholmodSupport.h.

641  : Base()
642  {
643  init();
644  this->compute(matrix);
645  }
CholmodDecomposition< MatrixType_, Lower > & compute(const MatrixType &matrix)

◆ ~CholmodDecomposition()

template<typename MatrixType_ , int UpLo_ = Lower>
Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::~CholmodDecomposition ( )
inline

Definition at line 647 of file CholmodSupport.h.

647 {}

Member Function Documentation

◆ init()

template<typename MatrixType_ , int UpLo_ = Lower>
void Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::init ( )
inlineprotected

Definition at line 675 of file CholmodSupport.h.

676  {
677  m_cholmod.final_asis = 1;
678  m_cholmod.supernodal = CHOLMOD_AUTO;
679  }

◆ setMode()

template<typename MatrixType_ , int UpLo_ = Lower>
void Eigen::CholmodDecomposition< MatrixType_, UpLo_ >::setMode ( CholmodMode  mode)
inline

Definition at line 649 of file CholmodSupport.h.

650  {
651  switch(mode)
652  {
653  case CholmodAuto:
654  m_cholmod.final_asis = 1;
655  m_cholmod.supernodal = CHOLMOD_AUTO;
656  break;
658  m_cholmod.final_asis = 0;
659  m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;
660  m_cholmod.final_ll = 1;
661  break;
663  m_cholmod.final_asis = 1;
664  m_cholmod.supernodal = CHOLMOD_SUPERNODAL;
665  break;
666  case CholmodLDLt:
667  m_cholmod.final_asis = 1;
668  m_cholmod.supernodal = CHOLMOD_SIMPLICIAL;
669  break;
670  default:
671  break;
672  }
673  }
@ CholmodSimplicialLLt
@ CholmodSupernodalLLt

Member Data Documentation

◆ m_cholmod

template<typename MatrixType_ , int UpLo_ = Lower>
cholmod_common Eigen::CholmodBase< MatrixType_, UpLo_, Derived >::m_cholmod
mutableprivate

Definition at line 448 of file CholmodSupport.h.


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