|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UnivariateRealIntegrator
Interface for univariate real integration algorithms.
Method Summary | |
---|---|
int |
getIterationCount()
Get the number of iterations in the last run of the integrator. |
int |
getMaximalIterationCount()
Get the upper limit for the number of iterations. |
int |
getMinimalIterationCount()
Get the lower limit for the number of iterations. |
double |
getRelativeAccuracy()
Get the actual relative accuracy. |
double |
getResult()
Get the result of the last run of the integrator. |
double |
integrate(double min,
double max)
Integrate the function in the given interval. |
void |
resetMaximalIterationCount()
Reset the upper limit for the number of iterations to the default. |
void |
resetMinimalIterationCount()
Reset the lower limit for the number of iterations to the default. |
void |
resetRelativeAccuracy()
Reset the relative accuracy to the default. |
void |
setMaximalIterationCount(int count)
Set the upper limit for the number of iterations. |
void |
setMinimalIterationCount(int count)
Set the lower limit for the number of iterations. |
void |
setRelativeAccuracy(double accuracy)
Set the relative accuracy. |
Method Detail |
---|
void setMaximalIterationCount(int count)
Usually a high iteration count indicates convergence problem. However, the "reasonable value" varies widely for different cases. Users are advised to use the default value.
A ConvergenceException
will be thrown if this number
is exceeded.
count
- maximum number of iterationsint getMaximalIterationCount()
void resetMaximalIterationCount()
The default value is supplied by the implementation.
setMaximalIterationCount(int)
void setMinimalIterationCount(int count)
Minimal iteration is needed to avoid false early convergence, e.g. the sample points happen to be zeroes of the function. Users can use the default value or choose one that they see as appropriate.
A ConvergenceException
will be thrown if this number
is not met.
count
- minimum number of iterationsint getMinimalIterationCount()
void resetMinimalIterationCount()
The default value is supplied by the implementation.
setMinimalIterationCount(int)
void setRelativeAccuracy(double accuracy)
This is used to stop iterations.
accuracy
- the relative accuracy
java.lang.IllegalArgumentException
- if the accuracy can't be achieved
or is otherwise deemed unreasonabledouble getRelativeAccuracy()
void resetRelativeAccuracy()
The default value is provided by the implementation.
setRelativeAccuracy(double)
double integrate(double min, double max) throws ConvergenceException, FunctionEvaluationException, java.lang.IllegalArgumentException
min
- the lower bound for the intervalmax
- the upper bound for the interval
ConvergenceException
- if the maximum iteration count is exceeded
or the integrator detects convergence problems otherwise
FunctionEvaluationException
- if an error occurs evaluating the
function
java.lang.IllegalArgumentException
- if min > max or the endpoints do not
satisfy the requirements specified by the integratordouble getResult() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if there is no result available, either
because no result was yet computed or the last attempt failedint getIterationCount() throws java.lang.IllegalStateException
This is mainly meant for testing purposes. It may occasionally help track down performance problems: if the iteration count is notoriously high, check whether the function is evaluated properly, and whether another integrator is more amenable to the problem.
java.lang.IllegalStateException
- if there is no result available, either
because no result was yet computed or the last attempt failed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |