Class ConvergenceCheckerAndMultiplexer<P>

java.lang.Object
org.hipparchus.optim.ConvergenceCheckerAndMultiplexer<P>
Type Parameters:
P - type of the evaluation
All Implemented Interfaces:
ConvergenceChecker<P>

public class ConvergenceCheckerAndMultiplexer<P> extends Object implements ConvergenceChecker<P>
Multiplexer for ConvergenceChecker, checking all the checkers converged.

The checkers are checked in the order of the initial list and the check loop is interrupted as soon as one checker fails to converge (that is the remaining checkers may not be called in first iterations.

Since:
2.1
  • Constructor Details

    • ConvergenceCheckerAndMultiplexer

      public ConvergenceCheckerAndMultiplexer(List<ConvergenceChecker<P>> checkers)
      Simple constructor.
      Parameters:
      checkers - checkers to use, convergence is reached when all checkers have converged
  • Method Details

    • converged

      public boolean converged(int iteration, P previous, P current)
      Check if the optimization algorithm has converged.
      Specified by:
      converged in interface ConvergenceChecker<P>
      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.