P
- type of the evaluationpublic class ConvergenceCheckerAndMultiplexer<P> extends Object implements ConvergenceChecker<P>
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.
Constructor and Description |
---|
ConvergenceCheckerAndMultiplexer(List<ConvergenceChecker<P>> checkers)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
converged(int iteration,
P previous,
P current)
Check if the optimization algorithm has converged.
|
public ConvergenceCheckerAndMultiplexer(List<ConvergenceChecker<P>> checkers)
checkers
- checkers to use, convergence is reached when
all checkers have convergedpublic boolean converged(int iteration, P previous, P current)
converged
in interface ConvergenceChecker<P>
iteration
- Current iteration.previous
- Best point in the previous iteration.current
- Best point in the current iteration.true
if the algorithm is considered to have converged.Copyright © 2016-2022 CS GROUP. All rights reserved.