| Modifier and Type | Field and Description |
|---|---|
| private final double | absoluteAccuracy
Absolute accuracy. |
| private static final double | DEFAULT_FUNCTION_VALUE_ACCURACY
Default function value accuracy. |
| private static final double | DEFAULT_RELATIVE_ACCURACY
Default relative accuracy. |
| private IntegerSequence. | evaluations
Evaluations counter. |
| private FUNC | function
Function to solve. |
| private final double | functionValueAccuracy
Function value accuracy. |
| private final double | relativeAccuracy
Relative accuracy. |
| private double | searchMax
Higher end of search interval. |
| private double | searchMin
Lower end of search interval. |
| private double | searchStart
Initial guess. |
| Access | Constructor and Description |
|---|---|
| protected | BaseAbstractUnivariateSolver(final double
Maximum absolute error. absoluteAccuracy)Construct a solver with given absolute accuracy. |
| protected | BaseAbstractUnivariateSolver(final double
Maximum relative error. relativeAccuracy, final double Maximum absolute error. absoluteAccuracy)Construct a solver with given accuracies. |
| protected | BaseAbstractUnivariateSolver(final double
Maximum relative error. relativeAccuracy, final double Maximum absolute error. absoluteAccuracy, final double Maximum function value error. functionValueAccuracy)Construct a solver with given accuracies. |
| Modifier and Type | Method and Description |
|---|---|
| protected double | Returns: the objective function value at specified point.Point at which the objective function must be evaluated. point)Compute the objective function value. |
| protected abstract double | Returns: the root.Method for implementing actual optimization algorithms in derived classes. |
| public double | getAbsoluteAccuracy()
Implements org. Get the absolute accuracy of the solver. |
| public int | getEvaluations()
Implements org. Get the number of evaluations of the objective function. |
| public double | getFunctionValueAccuracy()
Implements org. Get the function value accuracy of the solver. |
| public double | |
| public int | getMaxEvaluations()
Implements org. Get the maximum number of function evaluations. |
| public double | |
| public double | getRelativeAccuracy()
Implements org. Get the relative accuracy of the solver. |
| public double | |
| protected void | |
| protected boolean | Returns: true if the function values have opposite signs at the
given points.Lower endpoint. lower, final double Upper endpoint. upper)Check whether the function takes opposite signs at the endpoints. |
| protected boolean | Returns: true if the arguments form an increasing sequence.First number. start, final double Second number. mid, final double Third number. end)Check whether the arguments form a (strictly) increasing sequence. |
| protected void | setup(int
Maximum number of evaluations. maxEval, FUNC Function to solve. f, double Lower bound for the interval. min, double Upper bound for the interval. max, double Start value to use. startValue)Prepare for computation. |
| public double | solve(int
Maximum number of evaluations. maxEval, FUNC Function to solve. f, double Lower bound for the interval. min, double Upper bound for the interval. max, double Start value to use. startValue)Implements org. Solve for a zero in the given interval, start at |
| public double | solve(int
Maximum number of evaluations. maxEval, FUNC Function to solve. f, double Lower bound for the interval. min, double Upper bound for the interval. max)Implements org. Solve for a zero root in the given interval. |
| public double | solve(int
Maximum number of evaluations. maxEval, FUNC Function to solve. f, double Start value to use. startValue)Implements org. Solve for a zero in the vicinity of |
| protected void | verifyBracketing(final double
Lower endpoint. lower, final double Upper endpoint. upper)Check that the endpoints specify an interval and the function takes opposite signs at the endpoints. |
| protected void | verifyInterval(final double
Lower endpoint. lower, final double Upper endpoint. upper)Check that the endpoints specify an interval. |
| protected void | verifySequence(final double
Lower endpoint. lower, final double Initial value. initial, final double Upper endpoint. upper)Check that |
| absoluteAccuracy | back to summary |
|---|---|
| private final double absoluteAccuracy Absolute accuracy. | |
| DEFAULT_FUNCTION_VALUE_ACCURACY | back to summary |
|---|---|
| private static final double DEFAULT_FUNCTION_VALUE_ACCURACY Default function value accuracy. | |
| DEFAULT_RELATIVE_ACCURACY | back to summary |
|---|---|
| private static final double DEFAULT_RELATIVE_ACCURACY Default relative accuracy. | |
| evaluations | back to summary |
|---|---|
| private IntegerSequence. Evaluations counter. | |
| function | back to summary |
|---|---|
| private FUNC function Function to solve. | |
| functionValueAccuracy | back to summary |
|---|---|
| private final double functionValueAccuracy Function value accuracy. | |
| relativeAccuracy | back to summary |
|---|---|
| private final double relativeAccuracy Relative accuracy. | |
| searchMax | back to summary |
|---|---|
| private double searchMax Higher end of search interval. | |
| searchMin | back to summary |
|---|---|
| private double searchMin Lower end of search interval. | |
| searchStart | back to summary |
|---|---|
| private double searchStart Initial guess. | |
| BaseAbstractUnivariateSolver | back to summary |
|---|---|
| protected BaseAbstractUnivariateSolver(final double absoluteAccuracy) Construct a solver with given absolute accuracy.
| |
| BaseAbstractUnivariateSolver | back to summary |
|---|---|
| protected BaseAbstractUnivariateSolver(final double relativeAccuracy, final double absoluteAccuracy) Construct a solver with given accuracies.
| |
| BaseAbstractUnivariateSolver | back to summary |
|---|---|
| protected BaseAbstractUnivariateSolver(final double relativeAccuracy, final double absoluteAccuracy, final double functionValueAccuracy) Construct a solver with given accuracies.
| |
| computeObjectiveValue | back to summary |
|---|---|
| protected double computeObjectiveValue(double point) throws TooManyEvaluationsException Compute the objective function value.
| |
| doSolve | back to summary |
|---|---|
| protected abstract double doSolve() throws TooManyEvaluationsException, NoBracketingException Method for implementing actual optimization algorithms in derived classes.
| |
| getAbsoluteAccuracy | back to summary |
|---|---|
| public double getAbsoluteAccuracy() Implements org. Doc from org. Get the absolute accuracy of the solver. Solutions returned by the
solver should be accurate to this tolerance, i.e., if ε is the
absolute accuracy of the solver and
| |
| getEvaluations | back to summary |
|---|---|
| public int getEvaluations() Implements org. Doc from org. Get the number of evaluations of the objective function.
The number of evaluations corresponds to the last call to the
| |
| getFunctionValueAccuracy | back to summary |
|---|---|
| public double getFunctionValueAccuracy() Implements org. Doc from org. Get the function value accuracy of the solver. If
| |
| getMax | back to summary |
|---|---|
public double getMax()
| |
| getMaxEvaluations | back to summary |
|---|---|
| public int getMaxEvaluations() Implements org. Doc from org. Get the maximum number of function evaluations.
| |
| getMin | back to summary |
|---|---|
public double getMin()
| |
| getRelativeAccuracy | back to summary |
|---|---|
| public double getRelativeAccuracy() Implements org. Doc from org. Get the relative accuracy of the solver. The contract for relative
accuracy is the same as
| |
| getStartValue | back to summary |
|---|---|
public double getStartValue()
| |
| incrementEvaluationCount | back to summary |
|---|---|
| protected void incrementEvaluationCount() throws TooManyEvaluationsException Increment the evaluation count by one.
Method
| |
| isBracketing | back to summary |
|---|---|
| protected boolean isBracketing(final double lower, final double upper) Check whether the function takes opposite signs at the endpoints.
| |
| isSequence | back to summary |
|---|---|
| protected boolean isSequence(final double start, final double mid, final double end) Check whether the arguments form a (strictly) increasing sequence.
| |
| setup | back to summary |
|---|---|
| protected void setup(int maxEval, FUNC f, double min, double max, double startValue) throws NullArgumentException Prepare for computation.
Subclasses must call this method if they override any of the
| |
| solve | back to summary |
|---|---|
| public double solve(int maxEval, FUNC f, double min, double max, double startValue) throws TooManyEvaluationsException, NoBracketingException Implements org. Doc from org. Solve for a zero in the given interval, start at
| |
| solve | back to summary |
|---|---|
| public double solve(int maxEval, FUNC f, double min, double max) Implements org. Doc from org. Solve for a zero root in the given interval. 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 | back to summary |
|---|---|
| public double solve(int maxEval, FUNC f, double startValue) throws TooManyEvaluationsException, NoBracketingException Implements org. Doc from org. Solve for a zero in the vicinity of
| |
| verifyBracketing | back to summary |
|---|---|
| protected void verifyBracketing(final double lower, final double upper) throws NullArgumentException, NoBracketingException Check that the endpoints specify an interval and the function takes opposite signs at the endpoints.
| |
| verifyInterval | back to summary |
|---|---|
| protected void verifyInterval(final double lower, final double upper) throws NumberIsTooLargeException Check that the endpoints specify an interval.
| |
| verifySequence | back to summary |
|---|---|
| protected void verifySequence(final double lower, final double initial, final double upper) throws NumberIsTooLargeException Check that
| |