Package org.apache.commons.math3.dfp
Class BracketingNthOrderBrentSolverDFP
- java.lang.Object
-
- org.apache.commons.math3.analysis.solvers.FieldBracketingNthOrderBrentSolver<Dfp>
-
- org.apache.commons.math3.dfp.BracketingNthOrderBrentSolverDFP
-
- All Implemented Interfaces:
BracketedRealFieldUnivariateSolver<Dfp>
@Deprecated public class BracketingNthOrderBrentSolverDFP extends FieldBracketingNthOrderBrentSolver<Dfp>
Deprecated.as of 3.6 replaced withFieldBracketingNthOrderBrentSolverThis class implements a modification of the Brent algorithm.The changes with respect to the original Brent algorithm are:
- the returned value is chosen in the current interval according
to user specified
AllowedSolution, - the maximal order for the invert polynomial root search is user-specified instead of being invert quadratic only
-
-
Constructor Summary
Constructors Constructor Description BracketingNthOrderBrentSolverDFP(Dfp relativeAccuracy, Dfp absoluteAccuracy, Dfp functionValueAccuracy, int maximalOrder)Deprecated.Construct a solver.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DfpgetAbsoluteAccuracy()Deprecated.Get the absolute accuracy.DfpgetFunctionValueAccuracy()Deprecated.Get the function accuracy.DfpgetRelativeAccuracy()Deprecated.Get the relative accuracy.Dfpsolve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, AllowedSolution allowedSolution)Deprecated.Solve for a zero in the given interval.Dfpsolve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, Dfp startValue, AllowedSolution allowedSolution)Deprecated.Solve for a zero in the given interval, start atstartValue.-
Methods inherited from class org.apache.commons.math3.analysis.solvers.FieldBracketingNthOrderBrentSolver
getEvaluations, getMaxEvaluations, getMaximalOrder, solve, solve
-
-
-
-
Constructor Detail
-
BracketingNthOrderBrentSolverDFP
public BracketingNthOrderBrentSolverDFP(Dfp relativeAccuracy, Dfp absoluteAccuracy, Dfp functionValueAccuracy, int maximalOrder) throws NumberIsTooSmallException
Deprecated.Construct a solver.- Parameters:
relativeAccuracy- Relative accuracy.absoluteAccuracy- Absolute accuracy.functionValueAccuracy- Function value accuracy.maximalOrder- maximal order.- Throws:
NumberIsTooSmallException- if maximal order is lower than 2
-
-
Method Detail
-
getAbsoluteAccuracy
public Dfp getAbsoluteAccuracy()
Deprecated.Get the absolute accuracy.- Specified by:
getAbsoluteAccuracyin interfaceBracketedRealFieldUnivariateSolver<Dfp>- Overrides:
getAbsoluteAccuracyin classFieldBracketingNthOrderBrentSolver<Dfp>- Returns:
- absolute accuracy
-
getRelativeAccuracy
public Dfp getRelativeAccuracy()
Deprecated.Get the relative accuracy.- Specified by:
getRelativeAccuracyin interfaceBracketedRealFieldUnivariateSolver<Dfp>- Overrides:
getRelativeAccuracyin classFieldBracketingNthOrderBrentSolver<Dfp>- Returns:
- relative accuracy
-
getFunctionValueAccuracy
public Dfp getFunctionValueAccuracy()
Deprecated.Get the function accuracy.- Specified by:
getFunctionValueAccuracyin interfaceBracketedRealFieldUnivariateSolver<Dfp>- Overrides:
getFunctionValueAccuracyin classFieldBracketingNthOrderBrentSolver<Dfp>- Returns:
- function accuracy
-
solve
public Dfp solve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, AllowedSolution allowedSolution) throws NullArgumentException, NoBracketingException
Deprecated.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 root-finding algorithm may accept as solutions.- Returns:
- a value where the function is zero.
- Throws:
NullArgumentException- if f is null.NoBracketingException- if root cannot be bracketed
-
solve
public Dfp solve(int maxEval, UnivariateDfpFunction f, Dfp min, Dfp max, Dfp startValue, AllowedSolution allowedSolution) throws NullArgumentException, NoBracketingException
Deprecated.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 root-finding algorithm may accept as solutions.- Returns:
- a value where the function is zero.
- Throws:
NullArgumentException- if f is null.NoBracketingException- if root cannot be bracketed
-
-