SHOGUN  4.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions
IterativeSolverIterator< T > Class Template Reference

Detailed Description

template<class T>
class shogun::IterativeSolverIterator< T >

template class that is used as an iterator for an iterative linear solver. In the iteration of solving phase, each solver initializes the iteration with a maximum number of iteration limit, and relative/ absolute tolerence. They then call begin with the residual vector and continue until its end returns true, i.e. either it has converged or iteration count reached maximum limit.

Definition at line 43 of file IterativeSolverIterator.h.

Public Member Functions

 IterativeSolverIterator (const VectorXt &b, index_t max_iteration_limit=1000, float64_t relative_tolerence=1E-5, float64_t absolute_tolerence=1E-5)
 
void begin (const VectorXt &residual)
 
const bool end (const VectorXt &residual)
 
const IterInfo get_iter_info () const
 
const bool succeeded (const VectorXt &residual)
 
void operator++ ()
 

Constructor & Destructor Documentation

IterativeSolverIterator ( const VectorXt b,
index_t  max_iteration_limit = 1000,
float64_t  relative_tolerence = 1E-5,
float64_t  absolute_tolerence = 1E-5 
)

constructor

tolerence of the solver is absolute_tolerence + relative_tolerence * ||b||

Parameters
bthe vector of the linear system Ax=b
max_iteration_limitmaximum iteration limit
relative_tolerencerelative tolerence of the iterative method
absolute_tolerenceabsolute tolerence of the iterative method

Definition at line 59 of file IterativeSolverIterator.h.

Member Function Documentation

void begin ( const VectorXt residual)

assign operator from an IterInfo

Definition at line 72 of file IterativeSolverIterator.h.

const bool end ( const VectorXt residual)
Returns
true if converged or maximum iteration limit crossed

Definition at line 79 of file IterativeSolverIterator.h.

const IterInfo get_iter_info ( ) const
Returns
current iteration info

Definition at line 88 of file IterativeSolverIterator.h.

void operator++ ( )

increment operator

Definition at line 103 of file IterativeSolverIterator.h.

const bool succeeded ( const VectorXt residual)
Returns
success status

Definition at line 94 of file IterativeSolverIterator.h.


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

SHOGUN Machine Learning Toolbox - Documentation