|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator
org.apache.commons.math3.analysis.integration.TrapezoidIntegrator
public class TrapezoidIntegrator
Implements the Trapezoid Rule for integration of real univariate functions. For reference, see Introduction to Numerical Analysis, ISBN 038795452X, chapter 3.
The function should be integrable.
| Field Summary | |
|---|---|
static int |
TRAPEZOID_MAX_ITERATIONS_COUNT
Maximum number of iterations for trapezoid. |
| Fields inherited from class org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator |
|---|
DEFAULT_ABSOLUTE_ACCURACY, DEFAULT_MAX_ITERATIONS_COUNT, DEFAULT_MIN_ITERATIONS_COUNT, DEFAULT_RELATIVE_ACCURACY, iterations |
| Constructor Summary | |
|---|---|
TrapezoidIntegrator()
Construct a trapezoid integrator with default settings. |
|
TrapezoidIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount)
Build a trapezoid integrator with given accuracies and iterations counts. |
|
TrapezoidIntegrator(int minimalIterationCount,
int maximalIterationCount)
Build a trapezoid integrator with given iteration counts. |
|
| Method Summary | |
|---|---|
protected double |
doIntegrate()
Method for implementing actual integration algorithms in derived classes. |
| Methods inherited from class org.apache.commons.math3.analysis.integration.BaseAbstractUnivariateIntegrator |
|---|
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getIterations, getMax, getMaximalIterationCount, getMin, getMinimalIterationCount, getRelativeAccuracy, integrate, setup |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int TRAPEZOID_MAX_ITERATIONS_COUNT
| Constructor Detail |
|---|
public TrapezoidIntegrator(double relativeAccuracy,
double absoluteAccuracy,
int minimalIterationCount,
int maximalIterationCount)
throws NotStrictlyPositiveException,
NumberIsTooSmallException,
NumberIsTooLargeException
relativeAccuracy - relative accuracy of the resultabsoluteAccuracy - absolute accuracy of the resultminimalIterationCount - minimum number of iterationsmaximalIterationCount - maximum number of iterations
(must be less than or equal to TRAPEZOID_MAX_ITERATIONS_COUNT
NotStrictlyPositiveException - if minimal number of iterations
is not strictly positive
NumberIsTooSmallException - if maximal number of iterations
is lesser than or equal to the minimal number of iterations
NumberIsTooLargeException - if maximal number of iterations
is greater than TRAPEZOID_MAX_ITERATIONS_COUNT
public TrapezoidIntegrator(int minimalIterationCount,
int maximalIterationCount)
throws NotStrictlyPositiveException,
NumberIsTooSmallException,
NumberIsTooLargeException
minimalIterationCount - minimum number of iterationsmaximalIterationCount - maximum number of iterations
(must be less than or equal to TRAPEZOID_MAX_ITERATIONS_COUNT
NotStrictlyPositiveException - if minimal number of iterations
is not strictly positive
NumberIsTooSmallException - if maximal number of iterations
is lesser than or equal to the minimal number of iterations
NumberIsTooLargeException - if maximal number of iterations
is greater than TRAPEZOID_MAX_ITERATIONS_COUNTpublic TrapezoidIntegrator()
TRAPEZOID_MAX_ITERATIONS_COUNT)
| Method Detail |
|---|
protected double doIntegrate()
throws TooManyEvaluationsException,
MaxCountExceededException
doIntegrate in class BaseAbstractUnivariateIntegratorTooManyEvaluationsException - if the maximal number of evaluations
is exceeded.
MaxCountExceededException - if the maximum iteration count is exceeded
or the integrator detects convergence problems otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||