org.spaceroots.mantissa.quadrature.vectorial
Class EnhancedSimpsonIntegrator

java.lang.Object
  extended byorg.spaceroots.mantissa.quadrature.vectorial.EnhancedSimpsonIntegrator
All Implemented Interfaces:
SampledFunctionIntegrator

public class EnhancedSimpsonIntegrator
extends 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.

Version:
$Id: EnhancedSimpsonIntegrator.java 1709 2006-12-03 21:16:50Z luc $
Author:
L. Maisonobe

Constructor Summary
EnhancedSimpsonIntegrator()
           
 
Method Summary
 double[] integrate(SampledFunctionIterator iter)
          Integrate a sample over its overall range
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedSimpsonIntegrator

public EnhancedSimpsonIntegrator()
Method Detail

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:
ExhaustedSampleException - if the sample does not have enough points for the integration scheme
FunctionException - if the underlying sampled function throws one


Copyright © 2001-2007 Luc Maisonobe. All Rights Reserved.