|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
FUNC
- Type of function to solve.public interface BaseUnivariateSolver<FUNC extends UnivariateFunction>
Interface for (univariate real) rootfinding algorithms.
Implementations will search for only one zero in the given interval.
This class is not intended for use outside of the Apache Commons Math
library, regular user should rely on more specific interfaces like
UnivariateSolver
, PolynomialSolver
or DifferentiableUnivariateSolver
.
UnivariateSolver
,
PolynomialSolver
,
DifferentiableUnivariateSolver
Method Summary | |
---|---|
double |
getAbsoluteAccuracy()
Get the absolute accuracy of the solver. |
int |
getEvaluations()
Get the number of evaluations of the objective function. |
double |
getFunctionValueAccuracy()
Get the function value accuracy of the solver. |
int |
getMaxEvaluations()
Get the maximum number of function evaluations. |
double |
getRelativeAccuracy()
Get the relative accuracy of the solver. |
double |
solve(int maxEval,
FUNC f,
double startValue)
Solve for a zero in the vicinity of startValue . |
double |
solve(int maxEval,
FUNC f,
double min,
double max)
Solve for a zero root in the given interval. |
double |
solve(int maxEval,
FUNC f,
double min,
double max,
double startValue)
Solve for a zero in the given interval, start at startValue . |
Method Detail |
---|
int getMaxEvaluations()
int getEvaluations()
optimize
method. It is 0 if the method has not been
called yet.
double getAbsoluteAccuracy()
v
is a value returned by
one of the solve
methods, then a root of the function should
exist somewhere in the interval (v
- ε, v
+ ε).
double getRelativeAccuracy()
getAbsoluteAccuracy()
, but using
relative, rather than absolute error. If ρ is the relative accuracy
configured for a solver and v
is a value returned, then a root
of the function should exist somewhere in the interval
(v
- ρ v
, v
+ ρ v
).
double getFunctionValueAccuracy()
v
is
a value returned by the solver for a function f
,
then by contract, |f(v)|
should be less than or equal to
the function value accuracy configured for the solver.
double solve(int maxEval, FUNC f, double min, double max)
maxEval
- Maximum number of evaluations.f
- Function to solve.min
- Lower bound for the interval.max
- Upper bound for the interval.
MathIllegalArgumentException
- if the arguments do not satisfy the requirements specified by the solver.
TooManyEvaluationsException
- if
the allowed number of evaluations is exceeded.double solve(int maxEval, FUNC f, double min, double max, double startValue)
startValue
.
A solver may require that the interval brackets a single zero root.
Solvers that do require bracketing should be able to handle the case
where one of the endpoints is itself a root.
maxEval
- Maximum number of evaluations.f
- Function to solve.min
- Lower bound for the interval.max
- Upper bound for the interval.startValue
- Start value to use.
MathIllegalArgumentException
- if the arguments do not satisfy the requirements specified by the solver.
TooManyEvaluationsException
- if
the allowed number of evaluations is exceeded.double solve(int maxEval, FUNC f, double startValue)
startValue
.
f
- Function to solve.startValue
- Start value to use.maxEval
- Maximum number of evaluations.
MathIllegalArgumentException
- if the arguments do not satisfy the requirements specified by the solver.
TooManyEvaluationsException
- if
the allowed number of evaluations is exceeded.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |