|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver<UnivariateFunction>
org.apache.commons.math3.analysis.solvers.AbstractUnivariateSolver
org.apache.commons.math3.analysis.solvers.BrentSolver
public class BrentSolver
This class implements the
Brent algorithm for finding zeros of real univariate functions.
The function should be continuous but not necessarily smooth.
The solve method returns a zero x of the function f
in the given interval [a, b] to within a tolerance
6 eps abs(x) + t where eps is the relative accuracy and
t is the absolute accuracy.
The given interval must bracket the root.
| Constructor Summary | |
|---|---|
BrentSolver()
Construct a solver with default 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. |
|
| Method Summary | |
|---|---|
protected double |
doSolve()
Method for implementing actual optimization algorithms in derived classes. |
| Methods inherited from class org.apache.commons.math3.analysis.solvers.BaseAbstractUnivariateSolver |
|---|
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMax, getMaxEvaluations, getMin, getRelativeAccuracy, getStartValue, incrementEvaluationCount, isBracketing, isSequence, setup, solve, solve, solve, verifyBracketing, verifyInterval, verifySequence |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.commons.math3.analysis.solvers.BaseUnivariateSolver |
|---|
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solve |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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.
NumberIsTooLargeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||