WPILibC++ 2023.4.3
Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType > Class Template Reference

Modified Incomplete Cholesky with dual threshold. More...

#include </home/runner/work/allwpilib/allwpilib/wpimath/src/main/native/thirdparty/eigen/include/Eigen/src/IterativeLinearSolvers/IncompleteCholesky.h>

Inheritance diagram for Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >:
Eigen::SparseSolverBase< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > > Eigen::internal::noncopyable

Public Types

enum  { UpLo = _UpLo }
 
enum  { ColsAtCompileTime = Dynamic , MaxColsAtCompileTime = Dynamic }
 
typedef NumTraits< Scalar >::Real RealScalar
 
typedef _OrderingType OrderingType
 
typedef OrderingType::PermutationType PermutationType
 
typedef PermutationType::StorageIndex StorageIndex
 
typedef SparseMatrix< Scalar, ColMajor, StorageIndexFactorType
 
typedef Matrix< Scalar, Dynamic, 1 > VectorSx
 
typedef Matrix< RealScalar, Dynamic, 1 > VectorRx
 
typedef Matrix< StorageIndex, Dynamic, 1 > VectorIx
 
typedef std::vector< std::list< StorageIndex > > VectorList
 

Public Member Functions

 IncompleteCholesky ()
 Default constructor leaving the object in a partly non-initialized stage. More...
 
template<typename MatrixType >
 IncompleteCholesky (const MatrixType &matrix)
 Constructor computing the incomplete factorization for the given matrix matrix. More...
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
ComputationInfo info () const
 Reports whether previous computation was successful. More...
 
void setInitialShift (RealScalar shift)
 Set the initial shift parameter \( \sigma \). More...
 
template<typename MatrixType >
void analyzePattern (const MatrixType &mat)
 Computes the fill reducing permutation vector using the sparsity pattern of mat. More...
 
template<typename MatrixType >
void factorize (const MatrixType &mat)
 Performs the numerical factorization of the input matrix mat. More...
 
template<typename MatrixType >
void compute (const MatrixType &mat)
 Computes or re-computes the incomplete Cholesky factorization of the input matrix mat. More...
 
template<typename Rhs , typename Dest >
void _solve_impl (const Rhs &b, Dest &x) const
 
const FactorTypematrixL () const
 
const VectorRxscalingS () const
 
const PermutationTypepermutationP () const
 
template<typename _MatrixType >
void factorize (const _MatrixType &mat)
 
- Public Member Functions inherited from Eigen::SparseSolverBase< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > >
 SparseSolverBase ()
 Default constructor. More...
 
 ~SparseSolverBase ()
 
IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > & derived ()
 
const IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > & derived () const
 
const Solve< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > >, Rhs > solve (const MatrixBase< Rhs > &b) const
 
const Solve< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > >, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
void _solve_impl (const SparseMatrixBase< Rhs > &b, SparseMatrixBase< Dest > &dest) const
 

Protected Types

typedef SparseSolverBase< IncompleteCholesky< Scalar, _UpLo, _OrderingType > > Base
 

Protected Attributes

FactorType m_L
 
VectorRx m_scale
 
RealScalar m_initialShift
 
bool m_analysisIsOk
 
bool m_factorizationIsOk
 
ComputationInfo m_info
 
PermutationType m_perm
 
bool m_isInitialized
 
- Protected Attributes inherited from Eigen::SparseSolverBase< IncompleteCholesky< Scalar, Lower, AMDOrdering< int > > >
bool m_isInitialized
 

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
_UpLoThe triangular part that will be used for the computations. It can be Lower or Upper. Default is Lower.
_OrderingTypeThe 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>.

\implsparsesolverconcept

It performs the following incomplete factorization: \( S P A P' S \approx L L' \) 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 \( 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. Otherwise, the factorization is performed on the shifted matrix \( B + (\sigma+|\beta| I \) where \( \sigma \) is the initial shift value as returned and set by setInitialShift() method. The default value is \( \sigma = 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.

Member Typedef Documentation

◆ Base

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef SparseSolverBase<IncompleteCholesky<Scalar,_UpLo,_OrderingType> > Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::Base
protected

◆ FactorType

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef SparseMatrix<Scalar,ColMajor,StorageIndex> Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::FactorType

◆ OrderingType

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef _OrderingType Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::OrderingType

◆ PermutationType

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef OrderingType::PermutationType Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::PermutationType

◆ RealScalar

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef NumTraits<Scalar>::Real Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::RealScalar

◆ StorageIndex

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef PermutationType::StorageIndex Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::StorageIndex

◆ VectorIx

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef Matrix<StorageIndex,Dynamic, 1> Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::VectorIx

◆ VectorList

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef std::vector<std::list<StorageIndex> > Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::VectorList

◆ VectorRx

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef Matrix<RealScalar,Dynamic,1> Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::VectorRx

◆ VectorSx

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
typedef Matrix<Scalar,Dynamic,1> Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::VectorSx

Member Enumeration Documentation

◆ anonymous enum

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
anonymous enum
Enumerator
UpLo 

◆ anonymous enum

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
anonymous enum
Enumerator
ColsAtCompileTime 
MaxColsAtCompileTime 

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

◆ _solve_impl()

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
template<typename Rhs , typename Dest >
void Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::_solve_impl ( const Rhs &  b,
Dest &  x 
) const
inline

◆ analyzePattern()

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
template<typename MatrixType >
void Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::analyzePattern ( const MatrixType &  mat)
inline

Computes the fill reducing permutation vector using the sparsity pattern of mat.

◆ cols()

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
EIGEN_CONSTEXPR Index Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::cols ( ) const
inline
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() [1/2]

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
template<typename _MatrixType >
void Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::factorize ( const _MatrixType &  mat)

◆ factorize() [2/2]

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>>
EIGEN_CONSTEXPR Index Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::rows ( ) const
inline
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

◆ setInitialShift()

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
void Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::setInitialShift ( RealScalar  shift)
inline

Set the initial shift parameter \( \sigma \).

Member Data Documentation

◆ m_analysisIsOk

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
bool Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_analysisIsOk
protected

◆ m_factorizationIsOk

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
bool Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_factorizationIsOk
protected

◆ m_info

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
ComputationInfo Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_info
protected

◆ m_initialShift

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
RealScalar Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_initialShift
protected

◆ m_isInitialized

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
bool Eigen::SparseSolverBase< Derived >::m_isInitialized
mutableprotected

◆ m_L

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
FactorType Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_L
protected

◆ m_perm

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
PermutationType Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_perm
protected

◆ m_scale

template<typename Scalar , int _UpLo = Lower, typename _OrderingType = AMDOrdering<int>>
VectorRx Eigen::IncompleteCholesky< Scalar, _UpLo, _OrderingType >::m_scale
protected

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