public class EvaluationRmsChecker extends Object implements ConvergenceChecker<LeastSquaresProblem.Evaluation>
Constructor and Description |
---|
EvaluationRmsChecker(double tol)
Create a convergence checker for the RMS with the same relative and absolute
tolerance.
|
EvaluationRmsChecker(double relTol,
double absTol)
Create a convergence checker for the RMS with a relative and absolute tolerance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
converged(int iteration,
LeastSquaresProblem.Evaluation previous,
LeastSquaresProblem.Evaluation current)
Check if the optimization algorithm has converged.
|
public EvaluationRmsChecker(double tol)
Convenience constructor for when the relative and absolute tolerances are the
same. Same as new EvaluationRmsChecker(tol, tol)
.
tol
- the relative and absolute tolerance.EvaluationRmsChecker(double, double)
public EvaluationRmsChecker(double relTol, double absTol)
The optimization has converged when the RMS of consecutive evaluations are equal to within the given relative tolerance or absolute tolerance.
relTol
- the relative tolerance.absTol
- the absolute tolerance.Precision.equals(double, double, double)
,
Precision.equalsWithRelativeTolerance(double, double, double)
public boolean converged(int iteration, LeastSquaresProblem.Evaluation previous, LeastSquaresProblem.Evaluation current)
converged
in interface ConvergenceChecker<LeastSquaresProblem.Evaluation>
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 © 2003–2016 The Apache Software Foundation. All rights reserved.