Top Description Methods
org.apache.commons.math3.analysis.solvers

public Interface BracketedUnivariateSolver<FUNC extends UnivariateFunction>

extends BaseUnivariateSolver<FUNC extends UnivariateFunction>
Known Direct Implementers
org.apache.commons.math3.analysis.solvers.BracketingNthOrderBrentSolver, org.apache.commons.math3.analysis.solvers.BaseSecantSolver
Type Parameters
<FUNC>
Type of function to solve.
Imports
org.apache.commons.math3.analysis.UnivariateFunction

Interface for (univariate real) root-finding algorithms that maintain a bracketed solution. There are several advantages to having such root-finding algorithms:

For backwards compatibility, all root-finding algorithms must have ANY_SIDE as default for the allowed solutions.

Since
3.0
See Also
AllowedSolution

Method Summary

Modifier and TypeMethod and Description
public double

Returns:

A value where the function is zero.
solve
(int
Maximum number of evaluations.
maxEval
,
FUNC
Function to solve.
f
,
double
Lower bound for the interval.
min
,
double
Upper bound for the interval.
max
,
AllowedSolution
The kind of solutions that the root-finding algorithm may accept as solutions.
allowedSolution
)

Solve for a zero in the given interval.

public double

Returns:

A value where the function is zero.
solve
(int
Maximum number of evaluations.
maxEval
,
FUNC
Function to solve.
f
,
double
Lower bound for the interval.
min
,
double
Upper bound for the interval.
max
,
double
Start value to use.
startValue
,
AllowedSolution
The kind of solutions that the root-finding algorithm may accept as solutions.
allowedSolution
)

Solve for a zero in the given interval, start at startValue.

Inherited from org.apache.commons.math3.analysis.solvers.BaseUnivariateSolver:
getAbsoluteAccuracygetEvaluationsgetFunctionValueAccuracygetMaxEvaluationsgetRelativeAccuracysolvesolvesolve

Method Detail

solveback to summary
public double solve(int maxEval, FUNC f, double min, double max, AllowedSolution allowedSolution)

Solve for a zero in the given interval. 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.

Parameters
maxEval:int

Maximum number of evaluations.

f:FUNC

Function to solve.

min:double

Lower bound for the interval.

max:double

Upper bound for the interval.

allowedSolution:AllowedSolution

The kind of solutions that the root-finding algorithm may accept as solutions.

Returns:double

A value where the function is zero.

Exceptions
MathIllegalArgumentException:
if the arguments do not satisfy the requirements specified by the solver.
TooManyEvaluationsException:
if the allowed number of evaluations is exceeded.
solveback to summary
public double solve(int maxEval, FUNC f, double min, double max, double startValue, AllowedSolution allowedSolution)

Solve for a zero in the given interval, start at 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.

Parameters
maxEval:int

Maximum number of evaluations.

f:FUNC

Function to solve.

min:double

Lower bound for the interval.

max:double

Upper bound for the interval.

startValue:double

Start value to use.

allowedSolution:AllowedSolution

The kind of solutions that the root-finding algorithm may accept as solutions.

Returns:double

A value where the function is zero.

Exceptions
MathIllegalArgumentException:
if the arguments do not satisfy the requirements specified by the solver.
TooManyEvaluationsException:
if the allowed number of evaluations is exceeded.