BaseUnivariateSolver<UnivariateFunction>
, UnivariateSolver
public class SecantSolver extends AbstractUnivariateSolver
Implementation 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.
Note that since release 3.0 this class implements the actual
Secant algorithm, and not a modified one. As such, the 3.0 version
is not backwards compatible with previous versions. To use an algorithm
similar to the pre-3.0 releases, use the
Illinois
algorithm or the
Pegasus
algorithm.
Modifier and Type | Field | Description |
---|---|---|
protected static double |
DEFAULT_ABSOLUTE_ACCURACY |
Default absolute accuracy.
|
Constructor | Description |
---|---|
SecantSolver() |
Construct a solver with default accuracy (1e-6).
|
SecantSolver(double absoluteAccuracy) |
Construct a solver.
|
SecantSolver(double relativeAccuracy,
double absoluteAccuracy) |
Construct a solver.
|
Modifier and Type | Method | 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, verifySequence
getAbsoluteAccuracy, getEvaluations, getFunctionValueAccuracy, getMaxEvaluations, getRelativeAccuracy, solve, solve, solve
protected static final double DEFAULT_ABSOLUTE_ACCURACY
public SecantSolver()
public SecantSolver(double absoluteAccuracy)
absoluteAccuracy
- absolute accuracypublic SecantSolver(double relativeAccuracy, double absoluteAccuracy)
relativeAccuracy
- relative accuracyabsoluteAccuracy
- absolute accuracyprotected final double doSolve() throws MathIllegalArgumentException, MathIllegalStateException
doSolve
in class BaseAbstractUnivariateSolver<UnivariateFunction>
MathIllegalArgumentException
- if the initial search interval does not bracket
a root and the solver requires it.MathIllegalStateException
- if the maximal number of evaluations
is exceeded.Copyright © 2016–2018 Hipparchus.org. All rights reserved.