|
||||||||||
| 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.BaseSecantSolver
public abstract class BaseSecantSolver
Base class for all bracketing Secant-based methods for root-finding (approximating a zero of a univariate real function).
Implementation of the Regula Falsi and
Illinois methods is based on the
following article: M. Dowell and P. Jarratt,
A modified regula falsi method for computing the root of an
equation, BIT Numerical Mathematics, volume 11, number 2,
pages 168-174, Springer, 1971.
Implementation of the Pegasus method is
based on the following article: M. Dowell and P. Jarratt,
The "Pegasus" method for computing the root of an equation,
BIT Numerical Mathematics, volume 12, number 4, pages 503-508, Springer,
1972.
The Secant method is not a
bracketing method, so it is not implemented here. It has a separate
implementation.
| Nested Class Summary | |
|---|---|
protected static class |
BaseSecantSolver.Method
Secant-based root-finding methods. |
| Field Summary | |
|---|---|
protected static double |
DEFAULT_ABSOLUTE_ACCURACY
Default absolute accuracy. |
| Constructor Summary | |
|---|---|
protected |
BaseSecantSolver(double absoluteAccuracy,
BaseSecantSolver.Method method)
Construct a solver. |
protected |
BaseSecantSolver(double relativeAccuracy,
double absoluteAccuracy,
BaseSecantSolver.Method method)
Construct a solver. |
protected |
BaseSecantSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy,
BaseSecantSolver.Method method)
Construct a solver. |
| Method Summary | |
|---|---|
protected double |
doSolve()
Method for implementing actual optimization algorithms in derived classes. |
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)
Solve for a zero in the given interval, start at startValue. |
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, 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 |
| Field Detail |
|---|
protected static final double DEFAULT_ABSOLUTE_ACCURACY
| Constructor Detail |
|---|
protected BaseSecantSolver(double absoluteAccuracy,
BaseSecantSolver.Method method)
absoluteAccuracy - Absolute accuracy.method - Secant-based root-finding method to use.
protected BaseSecantSolver(double relativeAccuracy,
double absoluteAccuracy,
BaseSecantSolver.Method method)
relativeAccuracy - Relative accuracy.absoluteAccuracy - Absolute accuracy.method - Secant-based root-finding method to use.
protected BaseSecantSolver(double relativeAccuracy,
double absoluteAccuracy,
double functionValueAccuracy,
BaseSecantSolver.Method method)
relativeAccuracy - Maximum relative error.absoluteAccuracy - Maximum absolute error.functionValueAccuracy - Maximum function value error.method - Secant-based root-finding method to use| Method Detail |
|---|
public double solve(int maxEval,
UnivariateFunction f,
double min,
double max,
AllowedSolution allowedSolution)
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.
public double solve(int maxEval,
UnivariateFunction f,
double min,
double max,
double 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.
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.
public double solve(int maxEval,
UnivariateFunction f,
double min,
double max,
double startValue)
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 BaseUnivariateSolver<UnivariateFunction>solve in class BaseAbstractUnivariateSolver<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.
protected final double doSolve()
throws ConvergenceException,
MathInternalError
doSolve in class BaseAbstractUnivariateSolver<UnivariateFunction>ConvergenceException - if the algorithm failed due to finite
precision.
MathInternalError
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||