Eigen  5.0.1-dev
Loading...
Searching...
No Matches
Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ > Class Template Reference

#include <Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h>

Detailed Description

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
class Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >

Modified Incomplete Cholesky with dual threshold.

References : C-J. Lin and J. J. Moré, Incomplete Cholesky Factorizations with Limited memory, SIAM J. Sci. Comput. 21(1), pp. 24-45, 1999

Template Parameters
Scalarthe 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>.

This class follows the sparse solver concept .

It performs the following incomplete factorization: \( S P A P' S + \sigma I \approx L L' \) where L is a lower triangular factor, S is a diagonal scaling matrix, P is a fill-in reducing permutation as computed by the ordering method, and \( \sigma \) is a shift for ensuring the decomposed matrix is positive definite.

Shifting strategy: Let \( B = S P A P' S \) be the scaled matrix on which the factorization is carried out, and \( \beta \) be the minimum value of the diagonal. If \( \beta > 0 \) then, the factorization is directly performed on the matrix B, and \( \sigma = 0 \). Otherwise, the factorization is performed on the shifted matrix \( B + \sigma I \) for a shifting factor \( \sigma \). We start with \( \sigma = \sigma_0 - \beta \), where \( \sigma_0 \) is the initial shift value as returned and set by setInitialShift() method. The default value is \(\sigma_0 = 10^{-3} \). 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.

Inheritance diagram for Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >:

Public Member Functions

template<typename MatrixType>
void analyzePattern (const MatrixType &mat)
 Computes the fill reducing permutation vector using the sparsity pattern of mat.
constexpr Index cols () const noexcept
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.
 IncompleteCholesky ()
template<typename MatrixType>
 IncompleteCholesky (const MatrixType &matrix)
ComputationInfo info () const
 Reports whether previous computation was successful.
const FactorType & matrixL () const
const PermutationType & permutationP () const
constexpr Index rows () const noexcept
const VectorRx & scalingS () const
void setInitialShift (RealScalar shift)
 Set the initial shift parameter \( \sigma \).
RealScalar shift () const
Public Member Functions inherited from Eigen::SparseSolverBase< Derived >
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 ()

Constructor & Destructor Documentation

◆ IncompleteCholesky() [1/2]

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::IncompleteCholesky ( )
inline

Default constructor leaving the object in a partly non-initialized stage.

You must call compute() or the pair analyzePattern()/factorize() to make it valid.

See also
IncompleteCholesky(const MatrixType&)

◆ IncompleteCholesky() [2/2]

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
template<typename MatrixType>
Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::IncompleteCholesky ( const MatrixType & matrix)
inline

Constructor computing the incomplete factorization for the given matrix matrix.

Member Function Documentation

◆ cols()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
Index Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::cols ( ) const
inlineconstexprnoexcept
Returns
number of columns of the factored matrix

◆ compute()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
template<typename MatrixType>
void Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::compute ( const MatrixType & mat)
inline

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.

See also
analyzePattern(), factorize()

◆ factorize()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
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.

See also
compute(), analyzePattern()

◆ info()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
ComputationInfo Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::info ( ) const
inline

Reports whether previous computation was successful.

It triggers an assertion if *this has not been initialized through the respective constructor, or a call to compute() or analyzePattern().

Returns
Success if computation was successful, NumericalIssue if the matrix appears to be negative.

◆ matrixL()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
const FactorType & Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::matrixL ( ) const
inline
Returns
the sparse lower triangular factor L

◆ permutationP()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
const PermutationType & Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::permutationP ( ) const
inline
Returns
the fill-in reducing permutation P (can be empty for a natural ordering)

◆ rows()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
Index Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::rows ( ) const
inlineconstexprnoexcept
Returns
number of rows of the factored matrix

◆ scalingS()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
const VectorRx & Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::scalingS ( ) const
inline
Returns
a vector representing the scaling factor S

◆ shift()

template<typename Scalar, int UpLo_ = Lower, typename OrderingType_ = AMDOrdering<int>>
RealScalar Eigen::IncompleteCholesky< Scalar, UpLo_, OrderingType_ >::shift ( ) const
inline
Returns
the final shift parameter from the computation

The documentation for this class was generated from the following file:
  • /builddir/build/BUILD/eigen3-5.0.1-build/eigen-5.0.1/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h