Class RombergIntegrator1D
- java.lang.Object
-
- com.opengamma.strata.math.impl.integration.Integrator1D<Double,Double>
-
- com.opengamma.strata.math.impl.integration.RombergIntegrator1D
-
public class RombergIntegrator1D extends Integrator1D<Double,Double>
Romberg's method estimates an integral by repeatedly using Richardson extrapolation on the extended trapezium ruleExtendedTrapezoidIntegrator1D
.This class is a wrapper for the Commons Math library implementation of Romberg integration.
-
-
Constructor Summary
Constructors Constructor Description RombergIntegrator1D()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Double
integrate(Function<Double,Double> f, Double lower, Double upper)
Romberg integration method.-
Methods inherited from class com.opengamma.strata.math.impl.integration.Integrator1D
integrate
-
-
-
-
Method Detail
-
integrate
public Double integrate(Function<Double,Double> f, Double lower, Double upper)
Romberg integration method. Note that the Commons implementation fails if the lower bound is larger than the upper - in this case, the bounds are reversed and the result negated.- Specified by:
integrate
in classIntegrator1D<Double,Double>
- Parameters:
f
- The function to integrate, not nulllower
- The lower bound, not nullupper
- The upper bound, not null- Returns:
- The result of the integration
-
-