Class FieldTrapezoidIntegrator<T extends CalculusFieldElement<T>>
java.lang.Object
org.hipparchus.analysis.integration.BaseAbstractFieldUnivariateIntegrator<T>
org.hipparchus.analysis.integration.FieldTrapezoidIntegrator<T>
- Type Parameters:
T
- Type of the field elements.
- All Implemented Interfaces:
FieldUnivariateIntegrator<T>
public class FieldTrapezoidIntegrator<T extends CalculusFieldElement<T>>
extends BaseAbstractFieldUnivariateIntegrator<T>
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.
- Since:
- 2.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Maximum number of iterations for trapezoid.Fields inherited from class org.hipparchus.analysis.integration.BaseAbstractFieldUnivariateIntegrator
DEFAULT_ABSOLUTE_ACCURACY, DEFAULT_MAX_ITERATIONS_COUNT, DEFAULT_MIN_ITERATIONS_COUNT, DEFAULT_RELATIVE_ACCURACY, iterations
-
Constructor Summary
ConstructorDescriptionFieldTrapezoidIntegrator
(Field<T> field) Construct a trapezoid integrator with default settings.FieldTrapezoidIntegrator
(Field<T> field, double relativeAccuracy, double absoluteAccuracy, int minimalIterationCount, int maximalIterationCount) Build a trapezoid integrator with given accuracies and iterations counts.FieldTrapezoidIntegrator
(Field<T> field, int minimalIterationCount, int maximalIterationCount) Build a trapezoid integrator with given iteration counts. -
Method Summary
Modifier and TypeMethodDescriptionprotected T
Method for implementing actual integration algorithms in derived classes.Methods inherited from class org.hipparchus.analysis.integration.BaseAbstractFieldUnivariateIntegrator
computeObjectiveValue, getAbsoluteAccuracy, getEvaluations, getField, getIterations, getMax, getMaximalIterationCount, getMin, getMinimalIterationCount, getRelativeAccuracy, integrate, setup
-
Field Details
-
TRAPEZOID_MAX_ITERATIONS_COUNT
public static final int TRAPEZOID_MAX_ITERATIONS_COUNTMaximum number of iterations for trapezoid.- See Also:
-
-
Constructor Details
-
FieldTrapezoidIntegrator
public FieldTrapezoidIntegrator(Field<T> field, double relativeAccuracy, double absoluteAccuracy, int minimalIterationCount, int maximalIterationCount) throws MathIllegalArgumentException Build a trapezoid integrator with given accuracies and iterations counts.- Parameters:
field
- field to which function argument and value belongrelativeAccuracy
- relative accuracy of the resultabsoluteAccuracy
- absolute accuracy of the resultminimalIterationCount
- minimum number of iterationsmaximalIterationCount
- maximum number of iterations (must be less than or equal toTRAPEZOID_MAX_ITERATIONS_COUNT
- Throws:
MathIllegalArgumentException
- if minimal number of iterations is not strictly positiveMathIllegalArgumentException
- if maximal number of iterations is lesser than or equal to the minimal number of iterationsMathIllegalArgumentException
- if maximal number of iterations is greater thanTRAPEZOID_MAX_ITERATIONS_COUNT
-
FieldTrapezoidIntegrator
public FieldTrapezoidIntegrator(Field<T> field, int minimalIterationCount, int maximalIterationCount) throws MathIllegalArgumentException Build a trapezoid integrator with given iteration counts.- Parameters:
field
- field to which function argument and value belongminimalIterationCount
- minimum number of iterationsmaximalIterationCount
- maximum number of iterations (must be less than or equal toTRAPEZOID_MAX_ITERATIONS_COUNT
- Throws:
MathIllegalArgumentException
- if minimal number of iterations is not strictly positiveMathIllegalArgumentException
- if maximal number of iterations is lesser than or equal to the minimal number of iterationsMathIllegalArgumentException
- if maximal number of iterations is greater thanTRAPEZOID_MAX_ITERATIONS_COUNT
-
FieldTrapezoidIntegrator
Construct a trapezoid integrator with default settings.- Parameters:
field
- field to which function argument and value belong (max iteration count set toTRAPEZOID_MAX_ITERATIONS_COUNT
)
-
-
Method Details
-
doIntegrate
Method for implementing actual integration algorithms in derived classes.- Specified by:
doIntegrate
in classBaseAbstractFieldUnivariateIntegrator<T extends CalculusFieldElement<T>>
- Returns:
- the root.
- Throws:
MathIllegalStateException
- if the maximal number of evaluations is exceeded.MathIllegalArgumentException
-