org.spaceroots.mantissa.roots
Interface ConvergenceChecker
-
public interface ConvergenceCheckerThis interface specifies methods to check if a root-finding algorithm has converged. Deciding if convergence has been reached is a problem-dependent issue. The user should provide a class implementing this interface to allow the root-finding algorithm to stop its search according to the problem at hand.
-
-
Field Summary
Fields Modifier and Type Field and Description static intHIGHIndicator for convergence on the higher bound of the interval.static intLOWIndicator for convergence on the lower bound of the interval.static intNONEIndicator for no convergence.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intconverged(double xLow, double fLow, double xHigh, double fHigh)Check if the root-finding algorithm has converged on the interval.
-
-
-
Field Detail
-
NONE
static final int NONE
Indicator for no convergence.- See Also:
- Constant Field Values
-
LOW
static final int LOW
Indicator for convergence on the lower bound of the interval.- See Also:
- Constant Field Values
-
HIGH
static final int HIGH
Indicator for convergence on the higher bound of the interval.- See Also:
- Constant Field Values
-
-
Method Detail
-
converged
int converged(double xLow, double fLow, double xHigh, double fHigh)Check if the root-finding algorithm has converged on the interval. The interval defined by the arguments contains one root (if there was at least one in the initial interval given by the user to the root-finding algorithm, of course)- Parameters:
xLow- abscissa of the lower bound of the intervalfLow- value of the function the lower bound of the intervalxHigh- abscissa of the higher bound of the intervalfHigh- value of the function the higher bound of the interval- Returns:
- convergence indicator, must be one of
NONE,LOWorHIGH
-
-
DataMelt 3.0 © DataMelt by jWork.ORG