Method Summary |
|
double | getAbsoluteAccuracy() Get the actual absolute accuracy. |
double | getFunctionValueAccuracy() Get the actual function value accuracy. |
int | getIterationCount() Get the number of iterations in the last run of the solver.
This is mainly meant for testing purposes. |
int | getMaximalIterationCount() Get the upper limit for the number of iterations. |
double | getRelativeAccuracy() Get the actual relative accuracy. |
double | getResult() Get the result of the last run of the solver. |
void | resetAbsoluteAccuracy() Reset the absolute accuracy to the default. |
void | resetFunctionValueAccuracy() Reset the actual function accuracy to the default. |
void | resetMaximalIterationCount() Reset the upper limit for the number of iterations to the default. |
void | resetRelativeAccuracy() Reset the relative accuracy to the default. |
void | setAbsoluteAccuracy(double accuracy) Set the absolute accuracy.
The default is usually choosen so that roots in the interval
-10..-0.1 and +0.1..+10 can be found with a reasonable accuracy. |
void | setFunctionValueAccuracy(double accuracy) Set the function value accuracy.
This is used to determine whan an evaluated function value or some other
value which is used as divisor is zero.
This is a safety guard and it shouldn't be necesary to change this in
general.
Parameters: accuracy - the accuracy. throws: IllegalArgumentException - if the accuracy can't be achieved bythe solver or is otherwise deemed unreasonable. |
void | setMaximalIterationCount(int count) Set the upper limit for the number of iterations.
Usually a high iteration count indicates convergence problems. |
void | setRelativeAccuracy(double accuracy) Set the relative accuracy.
This is used to stop iterations if the absolute accuracy can't be
achieved due to large values or short mantissa length.
If this should be the primary criterion for convergence rather then a
safety measure, set the absolute accuracy to a ridiculously small value,
like 1E-1000.
Parameters: accuracy - the relative accuracy. throws: IllegalArgumentException - if the accuracy can't be achieved bythe solver or is otherwise deemed unreasonable. |
double | solve(double min, double max) Solve for a zero root in the given interval.
A solver may require that the interval brackets a single zero root.
Parameters: min - the lower bound for the interval. Parameters: max - the upper bound for the interval. |
double | solve(double min, double max, double startValue) Solve for a zero in the given interval, start at startValue. |