Class AdaptiveCompositeIntegrator1D
- java.lang.Object
-
- com.opengamma.strata.math.impl.integration.Integrator1D<Double,Double>
-
- com.opengamma.strata.math.impl.integration.AdaptiveCompositeIntegrator1D
-
public class AdaptiveCompositeIntegrator1D extends Integrator1D<Double,Double>
Adaptive composite integrator: step size is set to be small if functional variation of integrand is large The integrator in individual intervals (base integrator) should be specified by constructor.
-
-
Constructor Summary
Constructors Constructor Description AdaptiveCompositeIntegrator1D(Integrator1D<Double,Double> integrator)Creates an instance.AdaptiveCompositeIntegrator1D(Integrator1D<Double,Double> integrator, double gain, double tol)Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()Doubleintegrate(Function<Double,Double> f, Double lower, Double upper)1-D integration method.-
Methods inherited from class com.opengamma.strata.math.impl.integration.Integrator1D
integrate
-
-
-
-
Constructor Detail
-
AdaptiveCompositeIntegrator1D
public AdaptiveCompositeIntegrator1D(Integrator1D<Double,Double> integrator)
Creates an instance.- Parameters:
integrator- The base integrator
-
AdaptiveCompositeIntegrator1D
public AdaptiveCompositeIntegrator1D(Integrator1D<Double,Double> integrator, double gain, double tol)
Creates an instance.- Parameters:
integrator- The base integrator.gain- The gain ratiotol- The tolerance
-
-
Method Detail
-
integrate
public Double integrate(Function<Double,Double> f, Double lower, Double upper)
Description copied from class:Integrator1D1-D integration method.- Specified by:
integratein 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
-
-