P
- type of the evaluationpublic class ConvergenceCheckerOrMultiplexer<P> extends Object implements ConvergenceChecker<P>
ConvergenceChecker
, checking one of 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 has converged (that is the remaining checkers may not be called in the final iteration.
Constructor and Description |
---|
ConvergenceCheckerOrMultiplexer(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 ConvergenceCheckerOrMultiplexer(List<ConvergenceChecker<P>> checkers)
checkers
- checkers to use, convergence is reached when
any one of 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.