WPILibC++ 2023.4.3
Eigen::DiagonalPreconditioner< _Scalar > Class Template Reference

A preconditioner based on the digonal entries. More...

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

Inheritance diagram for Eigen::DiagonalPreconditioner< _Scalar >:
Eigen::LeastSquareDiagonalPreconditioner< _Scalar >

Public Types

enum  { ColsAtCompileTime = Dynamic , MaxColsAtCompileTime = Dynamic }
 
typedef Vector::StorageIndex StorageIndex
 

Public Member Functions

 DiagonalPreconditioner ()
 
template<typename MatType >
 DiagonalPreconditioner (const MatType &mat)
 
EIGEN_CONSTEXPR Index rows () const EIGEN_NOEXCEPT
 
EIGEN_CONSTEXPR Index cols () const EIGEN_NOEXCEPT
 
template<typename MatType >
DiagonalPreconditioneranalyzePattern (const MatType &)
 
template<typename MatType >
DiagonalPreconditionerfactorize (const MatType &mat)
 
template<typename MatType >
DiagonalPreconditionercompute (const MatType &mat)
 
template<typename Rhs , typename Dest >
void _solve_impl (const Rhs &b, Dest &x) const
 
template<typename Rhs >
const Solve< DiagonalPreconditioner, Rhs > solve (const MatrixBase< Rhs > &b) const
 
ComputationInfo info ()
 

Protected Attributes

Vector m_invdiag
 
bool m_isInitialized
 

Detailed Description

template<typename _Scalar>
class Eigen::DiagonalPreconditioner< _Scalar >

A preconditioner based on the digonal entries.

This class allows to approximately solve for A.x = b problems assuming A is a diagonal matrix. In other words, this preconditioner neglects all off diagonal entries and, in Eigen's language, solves for:

A.diagonal().asDiagonal() . x = b
b
Definition: data.h:44
Template Parameters
_Scalarthe type of the scalar.

\implsparsesolverconcept

This preconditioner is suitable for both selfadjoint and general problems. The diagonal entries are pre-inverted and stored into a dense vector.

Note
A variant that has yet to be implemented would attempt to preserve the norm of each column.
See also
class LeastSquareDiagonalPreconditioner, class ConjugateGradient

Member Typedef Documentation

◆ StorageIndex

template<typename _Scalar >
typedef Vector::StorageIndex Eigen::DiagonalPreconditioner< _Scalar >::StorageIndex

Member Enumeration Documentation

◆ anonymous enum

template<typename _Scalar >
anonymous enum
Enumerator
ColsAtCompileTime 
MaxColsAtCompileTime 

Constructor & Destructor Documentation

◆ DiagonalPreconditioner() [1/2]

template<typename _Scalar >
Eigen::DiagonalPreconditioner< _Scalar >::DiagonalPreconditioner ( )
inline

◆ DiagonalPreconditioner() [2/2]

template<typename _Scalar >
template<typename MatType >
Eigen::DiagonalPreconditioner< _Scalar >::DiagonalPreconditioner ( const MatType &  mat)
inlineexplicit

Member Function Documentation

◆ _solve_impl()

template<typename _Scalar >
template<typename Rhs , typename Dest >
void Eigen::DiagonalPreconditioner< _Scalar >::_solve_impl ( const Rhs &  b,
Dest &  x 
) const
inline

◆ analyzePattern()

template<typename _Scalar >
template<typename MatType >
DiagonalPreconditioner & Eigen::DiagonalPreconditioner< _Scalar >::analyzePattern ( const MatType &  )
inline

◆ cols()

template<typename _Scalar >
EIGEN_CONSTEXPR Index Eigen::DiagonalPreconditioner< _Scalar >::cols ( ) const
inline

◆ compute()

template<typename _Scalar >
template<typename MatType >
DiagonalPreconditioner & Eigen::DiagonalPreconditioner< _Scalar >::compute ( const MatType &  mat)
inline

◆ factorize()

template<typename _Scalar >
template<typename MatType >
DiagonalPreconditioner & Eigen::DiagonalPreconditioner< _Scalar >::factorize ( const MatType &  mat)
inline

◆ info()

template<typename _Scalar >
ComputationInfo Eigen::DiagonalPreconditioner< _Scalar >::info ( )
inline

◆ rows()

template<typename _Scalar >
EIGEN_CONSTEXPR Index Eigen::DiagonalPreconditioner< _Scalar >::rows ( ) const
inline

◆ solve()

template<typename _Scalar >
template<typename Rhs >
const Solve< DiagonalPreconditioner, Rhs > Eigen::DiagonalPreconditioner< _Scalar >::solve ( const MatrixBase< Rhs > &  b) const
inline

Member Data Documentation

◆ m_invdiag

template<typename _Scalar >
Vector Eigen::DiagonalPreconditioner< _Scalar >::m_invdiag
protected

◆ m_isInitialized

template<typename _Scalar >
bool Eigen::DiagonalPreconditioner< _Scalar >::m_isInitialized
protected

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