Class Integration
java.lang.Object
org.episteme.core.mathematics.analysis.Integration
Provides numerical integration capabilities.
* @author Silvere Martin-Michiellot
- Since:
- 1.0
- Author:
- Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntegratorGets the current default integrator.static Realintegrate(RealFunction f, Real a, Real b) Computes the definite integral of a function over the interval [a, b] using the default integrator strategy.static voidsetDefaultIntegrator(Integrator integrator) Sets the default integrator strategy.static Realtrapezoidal(RealFunction f, Real a, Real b, int n) Computes the definite integral using the Trapezoidal rule (simpler, faster, less accurate).
-
Method Details
-
setDefaultIntegrator
Sets the default integrator strategy.- Parameters:
integrator- the integrator to use by default
-
getDefaultIntegrator
Gets the current default integrator.- Returns:
- the default integrator
-
integrate
Computes the definite integral of a function over the interval [a, b] using the default integrator strategy.- Parameters:
f- the function to integratea- the lower boundb- the upper bound- Returns:
- the approximate value of the integral
-
trapezoidal
Computes the definite integral using the Trapezoidal rule (simpler, faster, less accurate).- Parameters:
f- the functiona- lower boundb- upper boundn- number of intervals- Returns:
- integral value
-