org.apache.commons.math.optimization
Interface ConvergenceChecker<PAIR>

Type Parameters:
PAIR - Type of the (point, objective value) pair.
All Known Implementing Classes:
AbstractConvergenceChecker, SimpleRealPointChecker, SimpleScalarValueChecker, SimpleVectorialPointChecker, SimpleVectorialValueChecker

public interface ConvergenceChecker<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.

Since:
3.0
Version:
$Id$
See Also:
SimpleScalarValueChecker, SimpleRealPointChecker

Method Summary
 boolean converged(int iteration, PAIR previous, PAIR current)
          Check if the optimization algorithm has converged.
 

Method Detail

converged

boolean converged(int iteration,
                  PAIR previous,
                  PAIR current)
Check if the optimization algorithm has converged.

Parameters:
iteration - Current iteration.
previous - Best point in the previous iteration.
current - Best point in the current iteration.
Returns:
true if the algorithm is considered to have converged.


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.