|
||||||||||
| 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.BracketingNthOrderBrentSolver
public class BracketingNthOrderBrentSolver
This class implements a modification of the Brent algorithm.
The changes with respect to the original Brent algorithm are:
AllowedSolution,
| Constructor Summary | |
|---|---|
BracketingNthOrderBrentSolver()
Construct a solver with default accuracy and maximal order (1e-6 and 5 respectively) |
|
BracketingNthOrderBrentSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy,
int maximalOrder)
Construct a solver. |
|
BracketingNthOrderBrentSolver(double relativeAccuracy,
double absoluteAccuracy,
int maximalOrder)
Construct a solver. |
|
BracketingNthOrderBrentSolver(double absoluteAccuracy,
int maximalOrder)
Construct a solver. |
|
| Method Summary | |
|---|---|
protected double |
doSolve()
Method for implementing actual optimization algorithms in derived classes. |
int |
getMaximalOrder()
Get the maximal order. |
double |
solve(int maxEval,
UnivariateFunction f,
double min,
double max,
AllowedSolution allowedSolution)
Solve for a zero in the given interval. |
double |
solve(int maxEval,
UnivariateFunction f,
double min,
double max,
double startValue,
AllowedSolution allowedSolution)
Solve for a zero in the given interval, start at startValue. |
| 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 BracketingNthOrderBrentSolver()
public BracketingNthOrderBrentSolver(double absoluteAccuracy,
int maximalOrder)
throws NumberIsTooSmallException
absoluteAccuracy - Absolute accuracy.maximalOrder - maximal order.
NumberIsTooSmallException - if maximal order is lower than 2
public BracketingNthOrderBrentSolver(double relativeAccuracy,
double absoluteAccuracy,
int maximalOrder)
throws NumberIsTooSmallException
relativeAccuracy - Relative accuracy.absoluteAccuracy - Absolute accuracy.maximalOrder - maximal order.
NumberIsTooSmallException - if maximal order is lower than 2
public BracketingNthOrderBrentSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy,
int maximalOrder)
throws NumberIsTooSmallException
relativeAccuracy - Relative accuracy.absoluteAccuracy - Absolute accuracy.functionValueAccuracy - Function value accuracy.maximalOrder - maximal order.
NumberIsTooSmallException - if maximal order is lower than 2| Method Detail |
|---|
public int getMaximalOrder()
protected double doSolve()
throws TooManyEvaluationsException,
NumberIsTooLargeException,
NoBracketingException
doSolve in class BaseAbstractUnivariateSolver<UnivariateFunction>TooManyEvaluationsException - if the maximal number of evaluations
is exceeded.
NoBracketingException - if the initial search interval does not bracket
a root and the solver requires it.
NumberIsTooLargeException
public double solve(int maxEval,
UnivariateFunction f,
double min,
double max,
AllowedSolution allowedSolution)
throws TooManyEvaluationsException,
NumberIsTooLargeException,
NoBracketingException
solve in interface BracketedUnivariateSolver<UnivariateFunction>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.
TooManyEvaluationsException - if
the allowed number of evaluations is exceeded.
NumberIsTooLargeException
NoBracketingException
public double solve(int maxEval,
UnivariateFunction f,
double min,
double max,
double startValue,
AllowedSolution allowedSolution)
throws TooManyEvaluationsException,
NumberIsTooLargeException,
NoBracketingException
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.
solve in interface BracketedUnivariateSolver<UnivariateFunction>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.
TooManyEvaluationsException - if
the allowed number of evaluations is exceeded.
NumberIsTooLargeException
NoBracketingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||