org.spaceroots.mantissa.quadrature.scalar
Class RiemannIntegrator
java.lang.Object
org.spaceroots.mantissa.quadrature.scalar.RiemannIntegrator
- All Implemented Interfaces:
- SampledFunctionIntegrator
- public class RiemannIntegrator
- extends 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.
- Version:
- $Id: RiemannIntegrator.java 1237 2002-03-20 21:01:57Z luc $
- Author:
- L. Maisonobe
- See Also:
TrapezoidIntegrator
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RiemannIntegrator
public RiemannIntegrator()
integrate
public double integrate(SampledFunctionIterator iter)
throws ExhaustedSampleException,
FunctionException
- Description copied from interface:
SampledFunctionIntegrator
- Integrate a sample over its overall range
- Specified by:
integrate in interface SampledFunctionIntegrator
- Parameters:
iter - iterator over the sample to integrate
- Returns:
- value of the integral over the sample range
- Throws:
FunctionException - if the underlying sampled function throws one
ExhaustedSampleException - if the sample does not have
enough points for the integration scheme
Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.