PAIR
- Type of (point, value) pair.public abstract class AbstractConvergenceChecker<PAIR> extends java.lang.Object implements ConvergenceChecker<PAIR>
Modifier and Type | Field and Description |
---|---|
private double |
absoluteThreshold
Absolute tolerance threshold.
|
private double |
relativeThreshold
Relative tolerance threshold.
|
Constructor and Description |
---|
AbstractConvergenceChecker(double relativeThreshold,
double absoluteThreshold)
Build an instance with a specified thresholds.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
converged(int iteration,
PAIR previous,
PAIR current)
Check if the optimization algorithm has converged.
|
double |
getAbsoluteThreshold() |
double |
getRelativeThreshold() |
private final double relativeThreshold
private final double absoluteThreshold
public AbstractConvergenceChecker(double relativeThreshold, double absoluteThreshold)
relativeThreshold
- relative tolerance thresholdabsoluteThreshold
- absolute tolerance thresholdpublic double getRelativeThreshold()
public double getAbsoluteThreshold()
public abstract boolean converged(int iteration, PAIR previous, PAIR current)
converged
in interface ConvergenceChecker<PAIR>
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 (c) 2003-2013 Apache Software Foundation