MaxIterationsStoppingCriterion¶
- class itergp.methods.stopping_criteria.MaxIterationsStoppingCriterion(maxiter=None, problem_size_factor=10)¶
Bases:
LinearSolverStoppingCriterionStop after a maximum number of iterations.
Stop when the solver has taken a maximum number of steps. The maximum number of iterations can either be specified in absolute terms or relative to the problem size.
- Parameters
Attributes Summary
Maximum number of steps.
Problem size factor.
Methods Summary
__call__(solver_state)Check whether the maximum number of iterations has been reached.
Attributes Documentation
- maxiter¶
Maximum number of steps.
- problem_size_factor¶
Problem size factor.
If
maxiteris None, stops afterproblem_size_factor * problem_sizesteps, whereproblem_sizeis the dimension of the solution to the linear system. Will be ignored otherwise.
Methods Documentation
- __call__(solver_state)[source]¶
Check whether the maximum number of iterations has been reached.
- Parameters
solver_state (probnum.linalg.solvers.LinearSolverState) – Current state of the linear solver.
- Return type