Class TrapezoidalIntegrator

java.lang.Object
org.episteme.core.mathematics.analysis.integration.TrapezoidalIntegrator
All Implemented Interfaces:
Integrator

public class TrapezoidalIntegrator extends Object implements Integrator
Trapezoidal rule integration.

Simple, fast numerical integration using the trapezoidal rule. Less accurate than adaptive methods but computationally efficient.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • TrapezoidalIntegrator

      public TrapezoidalIntegrator()
      Creates a trapezoidal integrator with default number of intervals.
    • TrapezoidalIntegrator

      public TrapezoidalIntegrator(int intervals)
      Creates a trapezoidal integrator with specified intervals.
      Parameters:
      intervals - number of subdivisions
  • Method Details

    • integrate

      public Real integrate(RealFunction f, Real a, Real b)
      Description copied from interface: Integrator
      Computes the definite integral of a function over [a, b].
      Specified by:
      integrate in interface Integrator
      Parameters:
      f - the function to integrate
      a - the lower bound
      b - the upper bound
      Returns:
      the approximate value of the integral
    • integrate

      public Real integrate(RealFunction f, Real a, Real b, Real tolerance)
      Description copied from interface: Integrator
      Computes the definite integral with specified tolerance.
      Specified by:
      integrate in interface Integrator
      Parameters:
      f - the function to integrate
      a - the lower bound
      b - the upper bound
      tolerance - the desired accuracy
      Returns:
      the approximate value of the integral