T
- Type of (point, value) pair.public abstract class AbstractConvergenceChecker<T> extends Object implements ConvergenceChecker<T>
Constructor and Description |
---|
AbstractConvergenceChecker(double relativeThresholdIn,
double absoluteThresholdIn)
Build an instance with a specified thresholds.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
converged(int iteration,
T previous,
T current)
Check if the optimization algorithm has converged.
|
double |
getAbsoluteThreshold() |
double |
getRelativeThreshold() |
public AbstractConvergenceChecker(double relativeThresholdIn, double absoluteThresholdIn)
relativeThresholdIn
- relative tolerance thresholdabsoluteThresholdIn
- absolute tolerance thresholdpublic double getRelativeThreshold()
public double getAbsoluteThreshold()
public abstract boolean converged(int iteration, T previous, T current)
converged
in interface ConvergenceChecker<T>
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 © 2019 CNES. All Rights Reserved.