Interface Integrator

All Known Subinterfaces:
IterativeIntegrator
All Known Implementing Classes:
ChangeOfVariable, GaussChebyshevQuadrature, GaussHermiteQuadrature, GaussianQuadrature, GaussLaguerreQuadrature, GaussLegendreQuadrature, Midpoint, NewtonCotes, Riemann, Romberg, Simpson, Trapezoidal

public interface Integrator
This defines the interface for the numerical integration of definite integrals of univariate functions.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Get the convergence threshold.
    double
    integrate(UnivariateRealFunction f, double a, double b)
    Integrate function f from a to b, \[ \int_a^b\! f(x)\, dx \]
  • Method Details

    • integrate

      double integrate(UnivariateRealFunction f, double a, double b)
      Integrate function f from a to b, \[ \int_a^b\! f(x)\, dx \]
      Parameters:
      f - a univariate function
      a - the lower limit
      b - the upper limit
      Returns:
      \(\int_a^b\! f(x)\, dx\)
    • getPrecision

      double getPrecision()
      Get the convergence threshold. The usage depends on the specific integrator. For example, for an IterativeIntegrator, the integral is considered converged if the relative error of two successive sums is less than the threshold.
      Returns:
      the precision