org.spaceroots.mantissa.quadrature.vectorial
Class RiemannIntegrator
- java.lang.Object
-
- org.spaceroots.mantissa.quadrature.vectorial.RiemannIntegrator
-
- All Implemented Interfaces:
- SampledFunctionIntegrator
public class RiemannIntegrator extends java.lang.Object implements SampledFunctionIntegrator
This class implements a Riemann integrator.A Riemann integrator is a very simple one that assumes the function is constant over the integration step. Since it is very simple, this algorithm needs very small steps to achieve high accuracy, and small steps lead to numerical errors and instabilities.
This algorithm is almost never used and has been included in this package only as a simple template for more useful integrators.
- See Also:
TrapezoidIntegrator
-
-
Constructor Summary
Constructors Constructor and Description RiemannIntegrator()
-
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