Top Description Methods
org.apache.commons.math3.optim

public Interface ConvergenceChecker<PAIR>

Known Direct Implementers
org.apache.commons.math3.fitting.leastsquares.EvaluationRmsChecker, org.apache.commons.math3.optim.AbstractConvergenceChecker
Type Parameters
<PAIR>
Type of the (point, objective value) pair.

This interface specifies how to check if an optimization algorithm has converged.
Deciding if convergence has been reached is a problem-dependent issue. The user should provide a class implementing this interface to allow the optimization algorithm to stop its search according to the problem at hand.
For convenience, three implementations that fit simple needs are already provided: SimpleValueChecker, SimpleVectorValueChecker and SimplePointChecker. The first two consider that convergence is reached when the objective function value does not change much anymore, it does not use the point set at all. The third one considers that convergence is reached when the input point set does not change much anymore, it does not use objective function value at all.
Since
3.0
See Also
org.apache.commons.math3.optim.SimplePointChecker, org.apache.commons.math3.optim.SimpleValueChecker, org.apache.commons.math3.optim.SimpleVectorValueChecker

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the algorithm is considered to have converged.
converged
(int
Current iteration.
iteration
,
PAIR
Best point in the previous iteration.
previous
,
PAIR
Best point in the current iteration.
current
)

Check if the optimization algorithm has converged.

Method Detail

convergedback to summary
public boolean converged(int iteration, PAIR previous, PAIR current)

Check if the optimization algorithm has converged.

Parameters
iteration:int

Current iteration.

previous:PAIR

Best point in the previous iteration.

current:PAIR

Best point in the current iteration.

Returns:boolean

true if the algorithm is considered to have converged.