jhplot.math.num
Class IterativeMethod
- java.lang.Object
-
- jhplot.math.num.IterativeMethod
-
- Direct Known Subclasses:
- AdaptiveIntegrator, BisectionRootFinder, BrentRootFinder, ContinuedFraction, FalsePositionRootFinder, NewtonRootFinder, PowerSeries, RombergIntegrator, SecantRootFinder, Series, SimpsonsIntegrator, TrapezoidalIntegrator
public abstract class IterativeMethod extends java.lang.Object
A method to solve generic problems by finding successive (and hopefully better) approximations to the solution.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
IterativeMethod.IterativeState
The current state for an iterative method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
getMaximumIterations()
Access the maximum number of iterations.double
getMaximumRelativeError()
Access the maximum relative error.void
iterate(IterativeMethod.IterativeState state)
Perform the iterative evaluation.void
setMaximumIterations(int iterations)
Modify the maximum number of iterations.void
setMaximumRelativeError(double error)
Modify the maximum relative error.
-
-
-
Method Detail
-
getMaximumIterations
public int getMaximumIterations()
Access the maximum number of iterations.- Returns:
- the maximum number of iterations.
-
getMaximumRelativeError
public double getMaximumRelativeError()
Access the maximum relative error.- Returns:
- the maximum relative error.
-
iterate
public void iterate(IterativeMethod.IterativeState state) throws NumericException
Perform the iterative evaluation. state is used to manage state between iterations.- Parameters:
state
- the state for this iterative method evaluation.- Throws:
NumericException
- if a solution to the iterative method can not be computed.
-
setMaximumIterations
public void setMaximumIterations(int iterations)
Modify the maximum number of iterations.- Parameters:
iterations
- the new maximum number of iterations value.
-
setMaximumRelativeError
public void setMaximumRelativeError(double error)
Modify the maximum relative error.- Parameters:
error
- the new maximum relative error.
-
-
DMelt 3.0 © DataMelt by jWork.ORG