|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.optimization.AbstractConvergenceChecker<UnivariatePointValuePair>
org.apache.commons.math3.optimization.univariate.SimpleUnivariateValueChecker
@Deprecated public class SimpleUnivariateValueChecker
Simple implementation of the
ConvergenceChecker
interface
that uses 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.
The converged
method will also return true
if the number of iterations
has been set (see this constructor
).
Field Summary | |
---|---|
private static int |
ITERATION_CHECK_DISABLED
Deprecated. If maxIterationCount is set to this value, the number of
iterations will never cause
converged(int,UnivariatePointValuePair,UnivariatePointValuePair)
to return true . |
private int |
maxIterationCount
Deprecated. Number of iterations after which the converged(int,UnivariatePointValuePair,UnivariatePointValuePair)
method will return true (unless the check is disabled). |
Constructor Summary | |
---|---|
SimpleUnivariateValueChecker()
Deprecated. See AbstractConvergenceChecker.AbstractConvergenceChecker() |
|
SimpleUnivariateValueChecker(double relativeThreshold,
double absoluteThreshold)
Deprecated. Build an instance with specified thresholds. |
|
SimpleUnivariateValueChecker(double relativeThreshold,
double absoluteThreshold,
int maxIter)
Deprecated. Builds an instance with specified thresholds. |
Method Summary | |
---|---|
boolean |
converged(int iteration,
UnivariatePointValuePair previous,
UnivariatePointValuePair current)
Deprecated. Check if the optimization algorithm has converged considering the last two points. |
Methods inherited from class org.apache.commons.math3.optimization.AbstractConvergenceChecker |
---|
getAbsoluteThreshold, getRelativeThreshold |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int ITERATION_CHECK_DISABLED
maxIterationCount
is set to this value, the number of
iterations will never cause
converged(int,UnivariatePointValuePair,UnivariatePointValuePair)
to return true
.
private final int maxIterationCount
converged(int,UnivariatePointValuePair,UnivariatePointValuePair)
method will return true (unless the check is disabled).
Constructor Detail |
---|
@Deprecated public SimpleUnivariateValueChecker()
AbstractConvergenceChecker.AbstractConvergenceChecker()
public SimpleUnivariateValueChecker(double relativeThreshold, double absoluteThreshold)
relativeThreshold
- relative tolerance thresholdabsoluteThreshold
- absolute tolerance thresholdpublic SimpleUnivariateValueChecker(double relativeThreshold, double absoluteThreshold, int maxIter)
relativeThreshold
- relative tolerance thresholdabsoluteThreshold
- absolute tolerance thresholdmaxIter
- Maximum iteration count.
NotStrictlyPositiveException
- if maxIter <= 0
.Method Detail |
---|
public boolean converged(int iteration, UnivariatePointValuePair previous, UnivariatePointValuePair current)
converged
in interface ConvergenceChecker<UnivariatePointValuePair>
converged
in class AbstractConvergenceChecker<UnivariatePointValuePair>
iteration
- Index of current iterationprevious
- Best point in the previous iteration.current
- Best point in the current iteration.
true
if the algorithm has converged.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |