Interface BracketedUnivariateSolver<FUNC extends UnivariateFunction>

 Type Parameters:
FUNC
 Type of function to solve.
 All Superinterfaces:
BaseUnivariateSolver<FUNC>
 All Known Implementing Classes:
BaseSecantSolver
,BracketingNthOrderBrentSolver
,IllinoisSolver
,PegasusSolver
,RegulaFalsiSolver
public interface BracketedUnivariateSolver<FUNC extends UnivariateFunction> extends BaseUnivariateSolver<FUNC>
Interface for(univariate real) rootfinding algorithms
that maintain a bracketed solution. There are several advantages to having such rootfinding algorithms: The bracketed solution guarantees that the root is kept within the interval. As such, these algorithms generally also guarantee convergence.
 The bracketed solution means that we have the opportunity to only
return roots that are greater than or equal to the actual root, or
are less than or equal to the actual root. That is, we can control
whether underapproximations and overapproximations are
allowed solutions
. Other rootfinding algorithms can usually only guarantee that the solution (the root that was found) is around the actual root.
For backwards compatibility, all rootfinding algorithms must have
ANY_SIDE
as default for the allowed solutions. Since:
 3.0
 See Also:
AllowedSolution


Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
solve(int maxEval, FUNC f, double min, double max, double startValue, AllowedSolution allowedSolution)
Solve for a zero in the given interval, start atstartValue
.double
solve(int maxEval, FUNC f, double min, double max, AllowedSolution allowedSolution)
Solve for a zero in the given interval.
Methods inherited from interface org.apache.commons.math4.legacy.analysis.solvers.BaseUnivariateSolver
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solve




Method Detail

solve
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
 Maximum number of evaluations.f
 Function to solve.min
 Lower bound for the interval.max
 Upper bound for the interval.allowedSolution
 The kind of solutions that the rootfinding algorithm may accept as solutions. Returns:
 A value where the function is zero.
 Throws:
MathIllegalArgumentException
 if the arguments do not satisfy the requirements specified by the solver.TooManyEvaluationsException
 if the allowed number of evaluations is exceeded.

solve
double solve(int maxEval, FUNC f, double min, double max, double startValue, AllowedSolution allowedSolution)
Solve for a zero in the given interval, start atstartValue
. 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
 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.allowedSolution
 The kind of solutions that the rootfinding algorithm may accept as solutions. Returns:
 A value where the function is zero.
 Throws:
MathIllegalArgumentException
 if the arguments do not satisfy the requirements specified by the solver.TooManyEvaluationsException
 if the allowed number of evaluations is exceeded.

