java.lang.Object
net.finmath.integration.AbstractRealIntegral
net.finmath.integration.TrapezoidalRealIntegrator
- All Implemented Interfaces:
RealIntegral
A simple integrator using the trapezoidal rule.
- Version:
- 1.0
- Author:
- Christian Fries
-
Constructor Summary
ConstructorsConstructorDescriptionTrapezoidalRealIntegrator(double lowerBound, double upperBound, double[] evaluationPoints)
Create an integrator using the trapezoidal rule.TrapezoidalRealIntegrator(double lowerBound, double upperBound, int numberOfEvaluationPoints)
Create an integrator using the trapezoidal rule and an equi-distant grid of evaluation points. -
Method Summary
Methods inherited from class net.finmath.integration.AbstractRealIntegral
getLowerBound, getUpperBound
-
Constructor Details
-
TrapezoidalRealIntegrator
public TrapezoidalRealIntegrator(double lowerBound, double upperBound, double[] evaluationPoints)Create an integrator using the trapezoidal rule.- Parameters:
lowerBound
- Lower bound of the integral.upperBound
- Upper bound of the integral.evaluationPoints
- An ordered array of the inner evaluation points to use.
-
TrapezoidalRealIntegrator
public TrapezoidalRealIntegrator(double lowerBound, double upperBound, int numberOfEvaluationPoints)Create an integrator using the trapezoidal rule and an equi-distant grid of evaluation points. The minimum number of evaluation points (numberOfEvaluationPoints
) is 2, since the trapezoidal rule operates on intervals. That is, lowerBound and upperBound are always evaluated. FornumberOfEvaluationPoints > 2
additional inner points will be evaluated.- Parameters:
lowerBound
- Lower bound of the integral.upperBound
- Upper bound of the integral.numberOfEvaluationPoints
- Number of evaluation points (that is calls to the applyAsDouble of integrand). Has to be > 2;
-
-
Method Details
-
integrate
- Specified by:
integrate
in interfaceRealIntegral
- Specified by:
integrate
in classAbstractRealIntegral
-