org.spaceroots.mantissa.quadrature.scalar
Class TrapezoidIntegrator
- java.lang.Object
-
- org.spaceroots.mantissa.quadrature.scalar.TrapezoidIntegrator
-
- All Implemented Interfaces:
- SampledFunctionIntegrator
public class TrapezoidIntegrator extends java.lang.Object implements SampledFunctionIntegrator
This class implements a trapezoid integrator.A trapezoid integrator is a very simple one that assumes the function is linear over the integration step.
-
-
Constructor Summary
Constructors Constructor and Description TrapezoidIntegrator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleintegrate(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