Top Description Fields Constructors Methods
org.apache.commons.math3.optim

public abstract Class AbstractConvergenceChecker<PAIR>

extends Object
implements ConvergenceChecker<PAIR>
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.optim.ConvergenceChecker
Known Direct Subclasses
org.apache.commons.math3.optim.SimplePointChecker, org.apache.commons.math3.optim.SimpleValueChecker, org.apache.commons.math3.optim.SimpleVectorValueChecker, org.apache.commons.math3.optim.univariate.SimpleUnivariateValueChecker
Type Parameters
<PAIR>
Type of (point, value) pair.

Base class for all convergence checker implementations.
Since
3.0

Field Summary

Modifier and TypeField and Description
private final double
absoluteThreshold

Absolute tolerance threshold.

private final double
relativeThreshold

Relative tolerance threshold.

Constructor Summary

AccessConstructor and Description
public
AbstractConvergenceChecker(final double
relative tolerance threshold
relativeThreshold
,
final double
absolute tolerance threshold
absoluteThreshold
)

Build an instance with a specified thresholds.

Method Summary

Modifier and TypeMethod and Description
public abstract boolean
converged(int
Current iteration.
iteration
,
PAIR
Best point in the previous iteration.
previous
,
PAIR
Best point in the current iteration.
current
)

Redeclares org.apache.commons.math3.optim.ConvergenceChecker.converged.

Check if the optimization algorithm has converged.

public double

Returns:

the absolute threshold.
getAbsoluteThreshold
()

public double

Returns:

the relative threshold.
getRelativeThreshold
()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

absoluteThresholdback to summary
private final double absoluteThreshold

Absolute tolerance threshold.

relativeThresholdback to summary
private final double relativeThreshold

Relative tolerance threshold.

Constructor Detail

AbstractConvergenceCheckerback to summary
public AbstractConvergenceChecker(final double relativeThreshold, final double absoluteThreshold)

Build an instance with a specified thresholds.

Parameters
relativeThreshold:double

relative tolerance threshold

absoluteThreshold:double

absolute tolerance threshold

Method Detail

convergedback to summary
public abstract boolean converged(int iteration, PAIR previous, PAIR current)

Redeclares org.apache.commons.math3.optim.ConvergenceChecker.converged.

Doc from org.apache.commons.math3.optim.ConvergenceChecker.converged.

Check if the optimization algorithm has converged.

Parameters
iteration:int

Current iteration.

previous:PAIR

Best point in the previous iteration.

current:PAIR

Best point in the current iteration.

Returns:boolean

true if the algorithm is considered to have converged.

getAbsoluteThresholdback to summary
public double getAbsoluteThreshold()
Returns:double

the absolute threshold.

getRelativeThresholdback to summary
public double getRelativeThreshold()
Returns:double

the relative threshold.