template<typename Scalar, int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
IncompleteCholesky class
Modified Incomplete Cholesky with dual threshold.
Template parameters | |
---|---|
Scalar | the scalar type of the input matrices |
_UpLo | The triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower. |
_OrderingType | The ordering method to use, either AMDOrdering<> or NaturalOrdering<>. Default is AMDOrdering<int>, unless EIGEN_MPL2_ONLY is defined, in which case the default is NaturalOrdering<int>. |
Contents
References : C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999
This class follows the sparse solver concept.
It performs the following incomplete factorization: where L is a lower triangular factor, S is a diagonal scaling matrix, and P is a fill-in reducing permutation as computed by the ordering method.
Shifting strategy: Let be the scaled matrix on which the factorization is carried out, and be the minimum value of the diagonal. If then, the factorization is directly performed on the matrix B. Otherwise, the factorization is performed on the shifted matrix where is the initial shift value as returned and set by setInitialShift() method. The default value is . If the factorization fails, then the shift in doubled until it succeed or a maximum of ten attempts. If it still fails, as returned by the info() method, then you can either increase the initial shift, or better use another preconditioning technique.
Base classes
-
template<typename Derived>class SparseSolverBase
- A base class for sparse solvers.
Constructors, destructors, conversion operators
- IncompleteCholesky()
-
template<typename MatrixType>IncompleteCholesky(const MatrixType& matrix)
Public functions
-
template<typename MatrixType>void analyzePattern(const MatrixType& mat)
- Computes the fill reducing permutation vector using the sparsity pattern of mat.
- auto cols() const -> Index
-
template<typename MatrixType>void compute(const MatrixType& mat)
-
template<typename MatrixType>void factorize(const MatrixType& mat)
- Performs the numerical factorization of the input matrix mat.
- auto info() const -> ComputationInfo
- Reports whether previous computation was successful.
- auto matrixL() const -> const FactorType&
- auto permutationP() const -> const PermutationType&
- auto rows() const -> Index
- auto scalingS() const -> const VectorRx&
- void setInitialShift(RealScalar shift)
- Set the initial shift parameter .
Function documentation
template<typename Scalar, int _UpLo, typename _OrderingType>
Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: IncompleteCholesky()
Default constructor leaving the object in a partly non-initialized stage.
You must call compute() or the pair analyzePattern()/factorize() to make it valid.
template<typename Scalar, int _UpLo, typename _OrderingType>
template<typename MatrixType>
Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: IncompleteCholesky(const MatrixType& matrix)
Constructor computing the incomplete factorization for the given matrix matrix.
template<typename Scalar, int _UpLo, typename _OrderingType>
template<typename MatrixType>
void Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: compute(const MatrixType& mat)
Computes or re-computes the incomplete Cholesky factorization of the input matrix mat
It is a shortcut for a sequential call to the analyzePattern() and factorize() methods.
template<typename Scalar, int _UpLo, typename _OrderingType>
template<typename MatrixType>
void Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: factorize(const MatrixType& mat)
Performs the numerical factorization of the input matrix mat.
The method analyzePattern() or compute() must have been called beforehand with a matrix having the same pattern.
template<typename Scalar, int _UpLo, typename _OrderingType>
ComputationInfo Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: info() const
Reports whether previous computation was successful.
Returns | Success if computation was successful, NumericalIssue if the matrix appears to be negative. |
---|
It triggers an assertion if *this
has not been initialized through the respective constructor, or a call to compute() or analyzePattern().
template<typename Scalar, int _UpLo, typename _OrderingType>
const FactorType& Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: matrixL() const
Returns | the sparse lower triangular factor L |
---|
template<typename Scalar, int _UpLo, typename _OrderingType>
const PermutationType& Eigen:: IncompleteCholesky<Scalar, _UpLo, _OrderingType>:: permutationP() const
Returns | the fill-in reducing permutation P (can be empty for a natural ordering) |
---|