public class SimpleValueChecker extends AbstractConvergenceChecker<PointValuePair>
ConvergenceChecker interface using
only objective function values.
Convergence is considered to have been reached if either the relative
difference between the objective function values is smaller than a
threshold or if either the absolute difference between the objective
function values is smaller than another threshold.| Constructor and Description |
|---|
SimpleValueChecker()
Build an instance with default thresholds.
|
SimpleValueChecker(double relativeThreshold,
double absoluteThreshold)
Build an instance with specified thresholds.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
converged(int iteration,
PointValuePair previous,
PointValuePair current)
Check if the optimization algorithm has converged considering the
last two points.
|
getAbsoluteThreshold, getRelativeThresholdpublic SimpleValueChecker()
public SimpleValueChecker(double relativeThreshold,
double absoluteThreshold)
relativeThreshold - relative tolerance thresholdabsoluteThreshold - absolute tolerance thresholdpublic boolean converged(int iteration,
PointValuePair previous,
PointValuePair current)
converged in interface ConvergenceChecker<PointValuePair>converged in class AbstractConvergenceChecker<PointValuePair>iteration - Index of current iterationprevious - Best point in the previous iteration.current - Best point in the current iteration.true if the algorithm has converged.Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.