namespace ewalena  0.2.15
ewalena is not an acronym
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Attributes
ewalena::SolverControl< ValueType > Class Template Reference

Solver control for eigenspectrum problems. More...

#include <include/ewalena/lac/solver_control.h>

Collaboration diagram for ewalena::SolverControl< ValueType >:
Collaboration graph
[legend]

List of all members.

Public Types

enum  State { null = 0, pass, fail }

Public Member Functions

State check (const unsigned int n_iterations, const ValueType tolerance)
unsigned int max_n_iterations () const
ValueType max_tolerance () const
unsigned int n_iterations () const
State solver_state ()
 SolverControl (const unsigned int max_n_iterations, const double max_tolerance)
ValueType tolerance () const
 ~SolverControl ()

Protected Attributes

unsigned int max_n_iterations_
ValueType max_tolerance_
unsigned int n_iterations_
State solver_state_
ValueType tolerance_

Detailed Description

template<typename ValueType = double>
class ewalena::SolverControl< ValueType >

Solver control for eigenspectrum problems.

The SolverBase class is a base class for solving eigenspectrum problems. The matrix $A$ has a right-eigenvector $x$ and eigenvalue $\lambda$ if:

\[A\cdot x=\lambda x\quad.\]

Note:
Not all solvers can make use of all options in the solver control since methods of finding a solution are individual. See SolverXXX class documentation for a description of which options are suitable for which solvers.
Author:
Toby D. Young 2012.

Member Enumeration Documentation

template<typename ValueType = double>
enum ewalena::SolverControl::State

Enumeration that defines the state of the solver.

Enumerator:
null 
pass 
fail 

Constructor & Destructor Documentation

template<typename ValueType = double>
ewalena::SolverControl< ValueType >::SolverControl ( const unsigned int  max_n_iterations,
const double  max_tolerance 
)

Constructor.

template<typename ValueType = double>
ewalena::SolverControl< ValueType >::~SolverControl ( )

Destructor.


Member Function Documentation

template<typename ValueType = double>
State ewalena::SolverControl< ValueType >::check ( const unsigned int  n_iterations,
const ValueType  tolerance 
)

Check the maximal number of iterations allowed for this solver control against the number of concurrent iterations and return the state of the solver.

template<typename ValueType = double>
unsigned int ewalena::SolverControl< ValueType >::max_n_iterations ( ) const

Return the maximum number of iterations attached to this solver control.

template<typename ValueType = double>
ValueType ewalena::SolverControl< ValueType >::max_tolerance ( ) const

Return the maximum tolerance attached to this solver control.

template<typename ValueType = double>
unsigned int ewalena::SolverControl< ValueType >::n_iterations ( ) const

Return the number of iterations passed by this solver at the time of calling this function.

template<typename ValueType = double>
State ewalena::SolverControl< ValueType >::solver_state ( )

Return the state of the solver.

template<typename ValueType = double>
ValueType ewalena::SolverControl< ValueType >::tolerance ( ) const

Return the tolerance obtained by this solver at the time of calling this function.


Member Data Documentation

template<typename ValueType = double>
unsigned int ewalena::SolverControl< ValueType >::max_n_iterations_ [protected]

Prescribed maximum number of iterations n_iterations that can be tried before solver failure is asserted.

template<typename ValueType = double>
ValueType ewalena::SolverControl< ValueType >::max_tolerance_ [protected]

Prescribed tolerance that can be tried before solver failure is asserted.

template<typename ValueType = double>
unsigned int ewalena::SolverControl< ValueType >::n_iterations_ [protected]

Internal reference to the total number of iterations this solver has completed, ie. asserts success. This usually refers to the maximally outer iteration in the case where two, or more, iterative procedures are used in the solver process.

template<typename ValueType = double>
State ewalena::SolverControl< ValueType >::solver_state_ [protected]

Internal reference to the state of the solver.

template<typename ValueType = double>
ValueType ewalena::SolverControl< ValueType >::tolerance_ [protected]

Internal reference to the total tolerance to be sought for the solver to report success.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines