OSVR-Core
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Eigen::IterativeSolverBase< Derived > Class Template Reference

Base class for linear iterative solvers. More...

#include <IterativeSolverBase.h>

Inheritance diagram for Eigen::IterativeSolverBase< Derived >:
Eigen::internal::noncopyable

Public Types

typedef internal::traits< Derived >::MatrixType MatrixType
 
typedef internal::traits< Derived >::Preconditioner Preconditioner
 
typedef MatrixType::Scalar Scalar
 
typedef MatrixType::Index Index
 
typedef MatrixType::RealScalar RealScalar
 

Public Member Functions

Derived & derived ()
 
const Derived & derived () const
 
 IterativeSolverBase ()
 Default constructor. More...
 
template<typename InputDerived >
 IterativeSolverBase (const EigenBase< InputDerived > &A)
 Initialize the solver with matrix A for further Ax=b solving. More...
 
template<typename InputDerived >
Derived & analyzePattern (const EigenBase< InputDerived > &A)
 Initializes the iterative solver for the sparcity pattern of the matrix A for further solving Ax=b problems. More...
 
template<typename InputDerived >
Derived & factorize (const EigenBase< InputDerived > &A)
 Initializes the iterative solver with the numerical values of the matrix A for further solving Ax=b problems. More...
 
template<typename InputDerived >
Derived & compute (const EigenBase< InputDerived > &A)
 Initializes the iterative solver with the matrix A for further solving Ax=b problems. More...
 
Index rows () const
 
Index cols () const
 
RealScalar tolerance () const
 
Derived & setTolerance (const RealScalar &tolerance)
 Sets the tolerance threshold used by the stopping criteria.
 
Preconditioner & preconditioner ()
 
const Preconditioner & preconditioner () const
 
int maxIterations () const
 
Derived & setMaxIterations (int maxIters)
 Sets the max number of iterations.
 
int iterations () const
 
RealScalar error () const
 
template<typename Rhs >
const internal::solve_retval< Derived, Rhs > solve (const MatrixBase< Rhs > &b) const
 
template<typename Rhs >
const internal::sparse_solve_retval< IterativeSolverBase, Rhs > solve (const SparseMatrixBase< Rhs > &b) const
 
ComputationInfo info () const
 
template<typename Rhs , typename DestScalar , int DestOptions, typename DestIndex >
void _solve_sparse (const Rhs &b, SparseMatrix< DestScalar, DestOptions, DestIndex > &dest) const
 

Protected Member Functions

template<typename InputDerived >
void grabInput (const EigenBase< InputDerived > &A)
 
template<typename InputDerived >
void grabInput_impl (const EigenBase< InputDerived > &A)
 
void grabInput_impl (MatrixType &A)
 
void init ()
 

Protected Attributes

MatrixType m_copyMatrix
 
const MatrixType * mp_matrix
 
Preconditioner m_preconditioner
 
int m_maxIterations
 
RealScalar m_tolerance
 
RealScalar m_error
 
int m_iterations
 
ComputationInfo m_info
 
bool m_isInitialized
 
bool m_analysisIsOk
 
bool m_factorizationIsOk
 

Detailed Description

template<typename Derived>
class Eigen::IterativeSolverBase< Derived >

Base class for linear iterative solvers.

See also
class SimplicialCholesky, DiagonalPreconditioner, IdentityPreconditioner

Constructor & Destructor Documentation

§ IterativeSolverBase() [1/2]

template<typename Derived>
Eigen::IterativeSolverBase< Derived >::IterativeSolverBase ( )
inline

Default constructor.

§ IterativeSolverBase() [2/2]

template<typename Derived>
template<typename InputDerived >
Eigen::IterativeSolverBase< Derived >::IterativeSolverBase ( const EigenBase< InputDerived > &  A)
inline

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().

Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if A is changed this class becomes invalid. Call compute() to update it with the new matrix A, or modify a copy of A.

Member Function Documentation

§ analyzePattern()

template<typename Derived>
template<typename InputDerived >
Derived& Eigen::IterativeSolverBase< Derived >::analyzePattern ( const EigenBase< InputDerived > &  A)
inline

Initializes the iterative solver for the sparcity pattern of the matrix A for further solving Ax=b problems.

Currently, this function mostly call analyzePattern on the preconditioner. In the future we might, for instance, implement column reodering for faster matrix vector products.

§ compute()

template<typename Derived>
template<typename InputDerived >
Derived& Eigen::IterativeSolverBase< Derived >::compute ( const EigenBase< InputDerived > &  A)
inline

Initializes the iterative solver with the matrix A for further solving Ax=b problems.

Currently, this function mostly initialized/compute the preconditioner. In the future we might, for instance, implement column reodering for faster matrix vector products.

Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if A is changed this class becomes invalid. Call compute() to update it with the new matrix A, or modify a copy of A.

§ error()

template<typename Derived>
RealScalar Eigen::IterativeSolverBase< Derived >::error ( ) const
inline
Returns
the tolerance error reached during the last solve

§ factorize()

template<typename Derived>
template<typename InputDerived >
Derived& Eigen::IterativeSolverBase< Derived >::factorize ( const EigenBase< InputDerived > &  A)
inline

Initializes the iterative solver with the numerical values of the matrix A for further solving Ax=b problems.

Currently, this function mostly call factorize on the preconditioner.

Warning
this class stores a reference to the matrix A as well as some precomputed values that depend on it. Therefore, if A is changed this class becomes invalid. Call compute() to update it with the new matrix A, or modify a copy of A.

§ info()

template<typename Derived>
ComputationInfo Eigen::IterativeSolverBase< Derived >::info ( ) const
inline
Returns
Success if the iterations converged, and NoConvergence otherwise.

§ iterations()

template<typename Derived>
int Eigen::IterativeSolverBase< Derived >::iterations ( ) const
inline
Returns
the number of iterations performed during the last solve

§ maxIterations()

template<typename Derived>
int Eigen::IterativeSolverBase< Derived >::maxIterations ( ) const
inline
Returns
the max number of iterations

§ preconditioner() [1/2]

template<typename Derived>
Preconditioner& Eigen::IterativeSolverBase< Derived >::preconditioner ( )
inline
Returns
a read-write reference to the preconditioner for custom configuration.

§ preconditioner() [2/2]

template<typename Derived>
const Preconditioner& Eigen::IterativeSolverBase< Derived >::preconditioner ( ) const
inline
Returns
a read-only reference to the preconditioner.

§ solve() [1/2]

template<typename Derived>
template<typename Rhs >
const internal::solve_retval<Derived, Rhs> Eigen::IterativeSolverBase< Derived >::solve ( const MatrixBase< Rhs > &  b) const
inline
Returns
the solution x of \( A x = b \) using the current decomposition of A.
See also
compute()

§ solve() [2/2]

template<typename Derived>
template<typename Rhs >
const internal::sparse_solve_retval<IterativeSolverBase, Rhs> Eigen::IterativeSolverBase< Derived >::solve ( const SparseMatrixBase< Rhs > &  b) const
inline
Returns
the solution x of \( A x = b \) using the current decomposition of A.
See also
compute()

§ tolerance()

template<typename Derived>
RealScalar Eigen::IterativeSolverBase< Derived >::tolerance ( ) const
inline
Returns
the tolerance threshold used by the stopping criteria

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