Package jsl.utilities.math
Class FunctionalIterator
- java.lang.Object
-
- jsl.utilities.math.DBHIterativeProcess
-
- jsl.utilities.math.FunctionalIterator
-
- Direct Known Subclasses:
RootFinder
public abstract class FunctionalIterator extends DBHIterativeProcess
Iterative process based on a one-variable function, having a single numerical result.
-
-
Field Summary
Fields Modifier and Type Field Description protected FunctionIfc
f
Function for which the zero will be found.protected double
result
Best approximation of the zero.
-
Constructor Summary
Constructors Constructor Description FunctionalIterator(FunctionIfc func)
Generic constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getResult()
Returns the result (assuming convergence has been attained).double
relativePrecision(double epsilon)
protected void
setFunction(FunctionIfc func)
-
Methods inherited from class jsl.utilities.math.DBHIterativeProcess
evaluate, evaluateIteration, finalizeIterations, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, initializeIterations, relativePrecision, setDesiredPrecision, setMaximumIterations
-
-
-
-
Field Detail
-
result
protected double result
Best approximation of the zero.
-
f
protected FunctionIfc f
Function for which the zero will be found.
-
-
Constructor Detail
-
FunctionalIterator
public FunctionalIterator(FunctionIfc func)
Generic constructor.- Parameters:
func
- OneVariableFunction
-
-
Method Detail
-
getResult
public double getResult()
Returns the result (assuming convergence has been attained).- Returns:
-
relativePrecision
public double relativePrecision(double epsilon)
- Parameters:
epsilon
- double- Returns:
- double
-
setFunction
protected void setFunction(FunctionIfc func)
- Parameters:
func
- OneVariableFunction
-
-