org.spaceroots.mantissa.quadrature.vectorial
Class EnhancedSimpsonIntegrator
- java.lang.Object
-
- org.spaceroots.mantissa.quadrature.vectorial.EnhancedSimpsonIntegrator
-
- All Implemented Interfaces:
- SampledFunctionIntegrator
public class EnhancedSimpsonIntegrator extends java.lang.Object implements SampledFunctionIntegrator
This class implements an enhanced Simpson-like integrator.A traditional Simpson integrator is based on a quadratic approximation of the function on three equally spaced points. This integrator does the same thing but can handle non-equally spaced points. If it is used on a regular sample, it behaves exactly as a traditional Simpson integrator.
-
-
Constructor Summary
Constructors Constructor and Description EnhancedSimpsonIntegrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]integrate(SampledFunctionIterator iter)Integrate a sample over its overall range
-
-
-
Method Detail
-
integrate
public double[] integrate(SampledFunctionIterator iter) throws ExhaustedSampleException, FunctionException
Description copied from interface:SampledFunctionIntegratorIntegrate a sample over its overall range- Specified by:
integratein interfaceSampledFunctionIntegrator- Parameters:
iter- iterator over the sample to integrate- Returns:
- value of the integral over the sample range
- Throws:
ExhaustedSampleException- if the sample does not have enough points for the integration schemeFunctionException- if the underlying sampled function throws one
-
-
DataMelt 3.0 © DataMelt by jWork.ORG