org.apache.commons.math3.optimization
@Deprecated public class SimpleVectorValueChecker extends AbstractConvergenceChecker<PointVectorValuePair>
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 for all vectors elements.
converged
method will also return true
if the number of iterations has been set
(see this constructor
).Modifier and Type | Field and Description |
---|---|
private static int |
ITERATION_CHECK_DISABLED
Deprecated.
If
maxIterationCount is set to this value, the number of
iterations will never cause
converged(int,PointVectorValuePair,PointVectorValuePair)
to return true . |
private int |
maxIterationCount
Deprecated.
Number of iterations after which the
converged(int,PointVectorValuePair,PointVectorValuePair) method
will return true (unless the check is disabled). |
Constructor and Description |
---|
SimpleVectorValueChecker()
Deprecated.
|
SimpleVectorValueChecker(double relativeThreshold,
double absoluteThreshold)
Deprecated.
Build an instance with specified thresholds.
|
SimpleVectorValueChecker(double relativeThreshold,
double absoluteThreshold,
int maxIter)
Deprecated.
Builds an instance with specified tolerance thresholds and
iteration count.
|
Modifier and Type | Method and Description |
---|---|
boolean |
converged(int iteration,
PointVectorValuePair previous,
PointVectorValuePair current)
Deprecated.
Check if the optimization algorithm has converged considering the
last two points.
|
getAbsoluteThreshold, getRelativeThreshold
private static final int ITERATION_CHECK_DISABLED
maxIterationCount
is set to this value, the number of
iterations will never cause
converged(int,PointVectorValuePair,PointVectorValuePair)
to return true
.private final int maxIterationCount
converged(int,PointVectorValuePair,PointVectorValuePair)
method
will return true (unless the check is disabled).@Deprecated public SimpleVectorValueChecker()
AbstractConvergenceChecker.AbstractConvergenceChecker()
public SimpleVectorValueChecker(double relativeThreshold, double absoluteThreshold)
relativeThreshold
- relative tolerance thresholdabsoluteThreshold
- absolute tolerance thresholdpublic SimpleVectorValueChecker(double relativeThreshold, double absoluteThreshold, int maxIter)
relativeThreshold
- Relative tolerance threshold.absoluteThreshold
- Absolute tolerance threshold.maxIter
- Maximum iteration count.NotStrictlyPositiveException
- if maxIter <= 0
.public boolean converged(int iteration, PointVectorValuePair previous, PointVectorValuePair current)
converged
in interface ConvergenceChecker<PointVectorValuePair>
converged
in class AbstractConvergenceChecker<PointVectorValuePair>
iteration
- Index of current iterationprevious
- Best point in the previous iteration.current
- Best point in the current iteration.true
if the arguments satify the convergence criterion.Copyright (c) 2003-2013 Apache Software Foundation