10 #ifndef EIGEN_BASIC_PRECONDITIONERS_H 11 #define EIGEN_BASIC_PRECONDITIONERS_H 32 template <
typename _Scalar>
45 template<
typename MatType>
54 template<
typename MatType>
60 template<
typename MatType>
64 for(
int j=0; j<mat.outerSize(); ++j)
66 typename MatType::InnerIterator it(mat,j);
67 while(it && it.index()!=j) ++it;
68 if(it && it.index()==j)
77 template<
typename MatType>
83 template<
typename Rhs,
typename Dest>
84 void _solve(
const Rhs& b, Dest& x)
const 94 &&
"DiagonalPreconditioner::solve(): invalid number of rows of the right hand side matrix b");
105 template<
typename _MatrixType,
typename Rhs>
112 template<typename Dest>
void evalTo(Dest& dst)
const 114 dec()._solve(
rhs(),dst);
131 template<
typename MatrixType>
134 template<
typename MatrixType>
137 template<
typename MatrixType>
140 template<
typename MatrixType>
143 template<
typename Rhs>
144 inline const Rhs&
solve(
const Rhs& b)
const {
return b; }
149 #endif // EIGEN_BASIC_PRECONDITIONERS_H void _solve(const Rhs &b, Dest &x) const
A preconditioner based on the digonal entries.
const internal::solve_retval< DiagonalPreconditioner, Rhs > solve(const MatrixBase< Rhs > &b) const
internal::traits< Derived >::Index Index
iterative scaling algorithm to equilibrate rows and column norms in matrices
IdentityPreconditioner & analyzePattern(const MatrixType &)
DiagonalPreconditioner< _MatrixType > Dec
DiagonalPreconditioner & factorize(const MatType &mat)
DiagonalPreconditioner & compute(const MatType &mat)
EIGEN_STRONG_INLINE void resize(Index nbRows, Index nbCols)
DiagonalPreconditioner & analyzePattern(const MatType &)
void rhs(const real_t *x, real_t *f)
IdentityPreconditioner & compute(const MatrixType &)
Matrix< Scalar, Dynamic, 1 > Vector
const Rhs & solve(const Rhs &b) const
Matrix< Scalar, Dynamic, Dynamic > MatrixType
DiagonalPreconditioner(const MatType &mat)
A naive preconditioner which approximates any matrix as the identity matrix.
#define EIGEN_MAKE_SOLVE_HELPERS(DecompositionType, Rhs)
IdentityPreconditioner & factorize(const MatrixType &)
Base class for all dense matrices, vectors, and expressions.
IdentityPreconditioner(const MatrixType &)