Class TrapezoidalRealIntegrator

  • All Implemented Interfaces:
    RealIntegral

    public class TrapezoidalRealIntegrator
    extends AbstractRealIntegral
    A simple integrator using the trapezoidal rule.
    Version:
    1.0
    Author:
    Christian Fries
    • Constructor Detail

      • 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. For numberOfEvaluationPoints > 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;