|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.analysis.UnivariateRealSolverImpl
org.apache.commons.math.analysis.RiddersSolver
public class RiddersSolver
Implements the Ridders' Method for root finding of real univariate functions. For reference, see C. Ridders, A new algorithm for computing a single root of a real continuous function , IEEE Transactions on Circuits and Systems, 26 (1979), 979 - 980.
The function should be continuous but not necessarily smooth.
Field Summary | |
---|---|
private static long |
serialVersionUID
serializable version identifier |
Fields inherited from class org.apache.commons.math.analysis.UnivariateRealSolverImpl |
---|
absoluteAccuracy, defaultAbsoluteAccuracy, defaultFunctionValueAccuracy, defaultMaximalIterationCount, defaultRelativeAccuracy, f, functionValueAccuracy, iterationCount, maximalIterationCount, relativeAccuracy, result, resultComputed |
Constructor Summary | |
---|---|
RiddersSolver(UnivariateRealFunction f)
Construct a solver for the given function. |
Method Summary | |
---|---|
double |
solve(double min,
double max)
Find a root in the given interval. |
double |
solve(double min,
double max,
double initial)
Find a root in the given interval with initial value. |
Methods inherited from class org.apache.commons.math.analysis.UnivariateRealSolverImpl |
---|
clearResult, getAbsoluteAccuracy, getFunctionValueAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, getResult, isBracketing, isSequence, resetAbsoluteAccuracy, resetFunctionValueAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setFunctionValueAccuracy, setMaximalIterationCount, setRelativeAccuracy, setResult, verifyBracketing, verifyInterval, verifySequence |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public RiddersSolver(UnivariateRealFunction f)
f
- function to solveMethod Detail |
---|
public double solve(double min, double max, double initial) throws MaxIterationsExceededException, FunctionEvaluationException
Requires bracketing condition.
min
- the lower bound for the intervalmax
- the upper bound for the intervalinitial
- the start value to use
MaxIterationsExceededException
- if the maximum iteration count is exceeded
FunctionEvaluationException
- if an error occurs evaluating the
function
java.lang.IllegalArgumentException
- if any parameters are invalidpublic double solve(double min, double max) throws MaxIterationsExceededException, FunctionEvaluationException
Requires bracketing condition.
min
- the lower bound for the intervalmax
- the upper bound for the interval
MaxIterationsExceededException
- if the maximum iteration count is exceeded
FunctionEvaluationException
- if an error occurs evaluating the
function
java.lang.IllegalArgumentException
- if any parameters are invalid
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |