public class BracketingNthOrderBrentSolverDFP extends Object
The changes with respect to the original Brent algorithm are:
AllowedSolution
,Constructor and Description |
---|
BracketingNthOrderBrentSolverDFP(Dfp relativeAccuracyIn,
Dfp absoluteAccuracyIn,
Dfp functionValueAccuracyIn,
int maximalOrderIn)
Construct a solver.
|
Modifier and Type | Method and Description |
---|---|
Dfp |
getAbsoluteAccuracy()
Get the absolute accuracy.
|
int |
getEvaluations()
Get the number of evaluations of the objective function.
|
Dfp |
getFunctionValueAccuracy()
Get the function accuracy.
|
int |
getMaxEvaluations()
Get the maximal number of function evaluations.
|
int |
getMaximalOrder()
Get the maximal order.
|
Dfp |
getRelativeAccuracy()
Get the relative accuracy.
|
Dfp |
solve(int maxEval,
UnivariateDfpFunction f,
Dfp min,
Dfp max,
AllowedSolution allowedSolution)
Solve for a zero in the given interval.
|
Dfp |
solve(int maxEval,
UnivariateDfpFunction f,
Dfp min,
Dfp max,
Dfp startValue,
AllowedSolution allowedSolution)
Solve for a zero in the given interval, start at
startValue . |
public BracketingNthOrderBrentSolverDFP(Dfp relativeAccuracyIn, Dfp absoluteAccuracyIn, Dfp functionValueAccuracyIn, int maximalOrderIn)
relativeAccuracyIn
- Relative accuracy.absoluteAccuracyIn
- Absolute accuracy.functionValueAccuracyIn
- Function value accuracy.maximalOrderIn
- maximal order.NumberIsTooSmallException
- if maximal order is lower than 2public int getMaximalOrder()
public int getMaxEvaluations()
public int getEvaluations()
optimize
method. It is 0 if the method has
not been
called yet.public Dfp getAbsoluteAccuracy()
public Dfp getRelativeAccuracy()
public Dfp getFunctionValueAccuracy()
public Dfp solve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, AllowedSolution allowedSolution)
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 root-finding algorithm may
accept as solutions.NullArgumentException
- if f is null.NoBracketingException
- if root cannot be bracketedpublic Dfp solve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, Dfp startValue, AllowedSolution allowedSolution)
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.allowedSolution
- The kind of solutions that the root-finding algorithm may
accept as solutions.NullArgumentException
- if f is null.NoBracketingException
- if root cannot be bracketedCopyright © 2019 CNES. All rights reserved.