|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.analysis.UnivariateRealSolverImpl
org.apache.commons.math.analysis.BisectionSolver
public class BisectionSolver
Implements the bisection algorithm for finding zeros of univariate real functions.
The function should be continuous but not necessarily smooth.
Constructor Summary | |
---|---|
BisectionSolver(UnivariateRealFunction f)
Construct a solver for the given function. |
Method Summary | |
---|---|
double |
solve(double min,
double max)
Find a zero root in the given interval. |
double |
solve(double min,
double max,
double initial)
Find a zero in the given interval. |
Methods inherited from class org.apache.commons.math.analysis.UnivariateRealSolverImpl |
---|
getAbsoluteAccuracy, getFunctionValueAccuracy, getIterationCount, getMaximalIterationCount, getRelativeAccuracy, getResult, resetAbsoluteAccuracy, resetFunctionValueAccuracy, resetMaximalIterationCount, resetRelativeAccuracy, setAbsoluteAccuracy, setFunctionValueAccuracy, setMaximalIterationCount, setRelativeAccuracy |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BisectionSolver(UnivariateRealFunction f)
f
- function to solve.Method Detail |
---|
public double solve(double min, double max, double initial) throws ConvergenceException, FunctionEvaluationException
min
- the lower bound for the interval.max
- the upper bound for the interval.initial
- the start value to use (ignored).
ConvergenceException
- the maximum iteration count is exceeded
FunctionEvaluationException
- if an error occurs evaluating
the function
java.lang.IllegalArgumentException
- if min is not less than maxpublic double solve(double min, double max) throws ConvergenceException, FunctionEvaluationException
min
- the lower bound for the intervalmax
- the upper bound for the interval
ConvergenceException
- if the maximum iteration count is exceeded.
FunctionEvaluationException
- if an error occurs evaluating the
function
java.lang.IllegalArgumentException
- if min is not less than max
|
|||||||||
PREV CLASS NEXT CLASS | All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |