public class TrapezoidalRealIntegrator extends AbstractRealIntegral
| Constructor and Description |
|---|
TrapezoidalRealIntegrator(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.
|
| Modifier and Type | Method and Description |
|---|---|
double |
integrate(DoubleUnaryOperator integrand) |
getLowerBound, getUpperBoundpublic TrapezoidalRealIntegrator(double lowerBound,
double upperBound,
double[] evaluationPoints)
lowerBound - Lower bound of the integral.upperBound - Upper bound of the integral.evaluationPoints - An ordered array of the inner evaluation points to use.public TrapezoidalRealIntegrator(double lowerBound,
double upperBound,
int numberOfEvaluationPoints)
numberOfEvaluationPoints) is 2, since the
trapezoidal rule operates on intervals. That is, lowerBound and upperBound are always evaluated. For
numberOfEvaluationPoints > 2 additional inner points will be evaluated.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;public double integrate(DoubleUnaryOperator integrand)
integrate in interface RealIntegralintegrate in class AbstractRealIntegralCopyright © 2019. All rights reserved.