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:
- Wikipedia: Numerical integration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description double
getPrecision()
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 Detail
-
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 functiona
- the lower limitb
- 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 anIterativeIntegrator
, the integral is considered converged if the relative error of two successive sums is less than the threshold.- Returns:
- the precision
-
-