template<typename Derived>
IterativeSolverBase class
Base class for linear iterative solvers.
Contents
Base classes
-
template<typename Derived>class SparseSolverBase
- A base class for sparse solvers.
Constructors, destructors, conversion operators
- IterativeSolverBase()
-
template<typename MatrixDerived>IterativeSolverBase(const EigenBase<MatrixDerived>& A) explicit
Public functions
-
template<typename MatrixDerived>auto analyzePattern(const EigenBase<MatrixDerived>& A) -> Derived&
-
template<typename MatrixDerived>auto compute(const EigenBase<MatrixDerived>& A) -> Derived&
- auto error() const -> RealScalar
-
template<typename MatrixDerived>auto factorize(const EigenBase<MatrixDerived>& A) -> Derived&
- auto info() const -> ComputationInfo
- auto iterations() const -> Index
- auto maxIterations() const -> Index
- auto preconditioner() -> Preconditioner&
- auto preconditioner() const -> const Preconditioner&
- auto setMaxIterations(Index maxIters) -> Derived&
- auto setTolerance(const RealScalar& tolerance) -> Derived&
-
template<typename Rhs, typename Guess>auto solveWithGuess(const MatrixBase<Rhs>& b, const Guess& x0) const -> const SolveWithGuess<Derived, Rhs, Guess>
- auto tolerance() const -> RealScalar
Function documentation
template<typename Derived>
Eigen:: IterativeSolverBase<Derived>:: IterativeSolverBase()
Default constructor.
template<typename Derived>
template<typename MatrixDerived>
Eigen:: IterativeSolverBase<Derived>:: IterativeSolverBase(const EigenBase<MatrixDerived>& A) explicit
Initialize the solver with matrix A for further Ax=b
solving.
This constructor is a shortcut for the default constructor followed by a call to compute().
template<typename Derived>
template<typename MatrixDerived>
Derived& Eigen:: IterativeSolverBase<Derived>:: analyzePattern(const EigenBase<MatrixDerived>& A)
Initializes the iterative solver for the sparsity pattern of the matrix A for further solving Ax=b
problems.
Currently, this function mostly calls analyzePattern on the preconditioner. In the future we might, for instance, implement column reordering for faster matrix vector products.
template<typename Derived>
template<typename MatrixDerived>
Derived& Eigen:: IterativeSolverBase<Derived>:: compute(const EigenBase<MatrixDerived>& A)
Initializes the iterative solver with the matrix A for further solving Ax=b
problems.
Currently, this function mostly initializes/computes the preconditioner. In the future we might, for instance, implement column reordering for faster matrix vector products.
template<typename Derived>
RealScalar Eigen:: IterativeSolverBase<Derived>:: error() const
Returns | the tolerance error reached during the last solve. It is a close approximation of the true relative residual error |Ax-b|/|b|. |
---|
template<typename Derived>
template<typename MatrixDerived>
Derived& Eigen:: IterativeSolverBase<Derived>:: factorize(const EigenBase<MatrixDerived>& A)
Initializes the iterative solver with the numerical values of the matrix A for further solving Ax=b
problems.
Currently, this function mostly calls factorize on the preconditioner.
template<typename Derived>
ComputationInfo Eigen:: IterativeSolverBase<Derived>:: info() const
Returns | Success if the iterations converged, and NoConvergence otherwise. |
---|
template<typename Derived>
Index Eigen:: IterativeSolverBase<Derived>:: iterations() const
Returns | the number of iterations performed during the last solve |
---|
template<typename Derived>
Index Eigen:: IterativeSolverBase<Derived>:: maxIterations() const
Returns | the max number of iterations. It is either the value set by setMaxIterations or, by default, twice the number of columns of the matrix. |
---|
template<typename Derived>
Preconditioner& Eigen:: IterativeSolverBase<Derived>:: preconditioner()
Returns | a read-write reference to the preconditioner for custom configuration. |
---|
template<typename Derived>
const Preconditioner& Eigen:: IterativeSolverBase<Derived>:: preconditioner() const
Returns | a read-only reference to the preconditioner. |
---|
template<typename Derived>
Derived& Eigen:: IterativeSolverBase<Derived>:: setMaxIterations(Index maxIters)
Sets the max number of iterations. Default is twice the number of columns of the matrix.
template<typename Derived>
Derived& Eigen:: IterativeSolverBase<Derived>:: setTolerance(const RealScalar& tolerance)
Sets the tolerance threshold used by the stopping criteria.
This value is used as an upper bound to the relative residual error: |Ax-b|/|b|. The default value is the machine precision given by NumTraits<Scalar>::epsilon()
template<typename Derived>
template<typename Rhs, typename Guess>
const SolveWithGuess<Derived, Rhs, Guess> Eigen:: IterativeSolverBase<Derived>:: solveWithGuess(const MatrixBase<Rhs>& b,
const Guess& x0) const
Returns | the solution x of using the current decomposition of A and x0 as an initial solution. |
---|
template<typename Derived>
RealScalar Eigen:: IterativeSolverBase<Derived>:: tolerance() const
Returns | the tolerance threshold used by the stopping criteria. |
---|