public class BrentSolver extends AbstractUnivariateSolver
solve method returns a zero x of the function f
in the given interval [a, b] to within a tolerance
2 eps abs(x) + t where eps is the relative accuracy and
t is the absolute accuracy.
The given interval must bracket the root.
The reference implementation is given in chapter 4 of
Algorithms for Minimization Without Derivatives, Richard P. Brent, Dover, 2002
BaseAbstractUnivariateSolver| Constructor and Description |
|---|
BrentSolver()
Construct a solver with default absolute accuracy (1e-6).
|
BrentSolver(double absoluteAccuracy)
Construct a solver.
|
BrentSolver(double relativeAccuracy,
double absoluteAccuracy)
Construct a solver.
|
BrentSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy)
Construct a solver.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
doSolve()
Method for implementing actual optimization algorithms in derived
classes.
|
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, setup, solve, solve, solve, verifyBracketing, verifyInterval, verifySequenceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solvepublic BrentSolver()
public BrentSolver(double absoluteAccuracy)
absoluteAccuracy - Absolute accuracy.public BrentSolver(double relativeAccuracy, double absoluteAccuracy)
relativeAccuracy - Relative accuracy.absoluteAccuracy - Absolute accuracy.public BrentSolver(double relativeAccuracy, double absoluteAccuracy, double functionValueAccuracy)
relativeAccuracy - Relative accuracy.absoluteAccuracy - Absolute accuracy.functionValueAccuracy - Function value accuracy.BaseAbstractUnivariateSolver.BaseAbstractUnivariateSolver(double,double,double)protected double doSolve() throws NoBracketingException, TooManyEvaluationsException, NumberIsTooLargeException
doSolve in class BaseAbstractUnivariateSolver<UnivariateFunction>NoBracketingException - if the initial search interval does not bracket
a root and the solver requires it.TooManyEvaluationsException - if the maximal number of evaluations
is exceeded.NumberIsTooLargeExceptionCopyright © 2003–2016 The Apache Software Foundation. All rights reserved.