Iteration [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:itl,utilities Component type:concept
Description
The Iteration object calculates whether the solution has reached the desired accuracy, or whether the maximum number of iterations has been reached. The method finished() checks both convergence and number of iterations. The method converged() only checks convergence. The error code() method is used to determine the return value for the this iterative solver function. The first() method is used to determine the first iteration of the loop.

For all algorithms, if the error_code() is 0, it suggests the algorithm converges. Otherwise, if the error_code() returns 1, it means the maximum number of iteration has been reached but the desired accuacy is not reached. For other return codes, see the respective document.

Refinement of
Associated types
Concept Type name Description
Notations
Definitions
Expression semantics
Description Expression Semantics
Testing if stop criteria is satisfied finish( Vector );  
Testing if stop criteria is satisfied for the case of qusi residual case. finish( TrivialType );  
Testing if it is converged converged( Vector );  
Testing if it is converged for the case of qusi residual case. converged( TrivialType );  
to increment number of iteration by one Iter;  
to Check if this is the first iteration Iter.first();  
to return error_code. Zero means success. Iter.error_code();  
to return number of iteration to be performed. Iter.iteration();  
to return residual or qusi-residual Iter.resid();  
to return tolerance. Iter.tol();  
set fail reason once fail happens during iteration fail( int );  
set fail reason once fail happens during iteration fail( int, string );  
Function specification
Name Function Complexity
Invariants
Models
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.