Class TrapezoidalIntegrator
java.lang.Object
org.episteme.core.mathematics.analysis.integration.TrapezoidalIntegrator
- All Implemented Interfaces:
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 Summary
ConstructorsConstructorDescriptionCreates a trapezoidal integrator with default number of intervals.TrapezoidalIntegrator(int intervals) Creates a trapezoidal integrator with specified intervals. -
Method Summary
-
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
Description copied from interface:IntegratorComputes the definite integral of a function over [a, b].- Specified by:
integratein interfaceIntegrator- Parameters:
f- the function to integratea- the lower boundb- the upper bound- Returns:
- the approximate value of the integral
-
integrate
Description copied from interface:IntegratorComputes the definite integral with specified tolerance.- Specified by:
integratein interfaceIntegrator- Parameters:
f- the function to integratea- the lower boundb- the upper boundtolerance- the desired accuracy- Returns:
- the approximate value of the integral
-