org.spaceroots.mantissa.quadrature.vectorial
Class EnhancedSimpsonIntegratorSampler

java.lang.Object
  extended byorg.spaceroots.mantissa.quadrature.vectorial.EnhancedSimpsonIntegratorSampler
All Implemented Interfaces:
SampledFunctionIterator

public class EnhancedSimpsonIntegratorSampler
extends Object
implements SampledFunctionIterator

This class implements an enhanced Simpson integrator as a sample.

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: EnhancedSimpsonIntegratorSampler.java 1709 2006-12-03 21:16:50Z luc $
Author:
L. Maisonobe
See Also:
EnhancedSimpsonIntegrator

Constructor Summary
EnhancedSimpsonIntegratorSampler(SampledFunctionIterator iter)
          Constructor.
 
Method Summary
 int getDimension()
          Get the dimension of the vectorial values of the function.
 boolean hasNext()
          Check if the iterator can provide another point.
 VectorialValuedPair nextSamplePoint()
          Get the next point of a sampled function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedSimpsonIntegratorSampler

public EnhancedSimpsonIntegratorSampler(SampledFunctionIterator iter)
                                 throws ExhaustedSampleException,
                                        FunctionException
Constructor. Build an integrator from an underlying sample iterator.

Parameters:
iter - iterator over the base function
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: SampledFunctionIterator
Check if the iterator can provide another point.

Specified by:
hasNext in interface SampledFunctionIterator
Returns:
true if the iterator can provide another point.

getDimension

public int getDimension()
Description copied from interface: SampledFunctionIterator
Get the dimension of the vectorial values of the function.

Specified by:
getDimension in interface SampledFunctionIterator
Returns:
dimension

nextSamplePoint

public VectorialValuedPair nextSamplePoint()
                                    throws ExhaustedSampleException,
                                           FunctionException
Description copied from interface: SampledFunctionIterator
Get the next point of a sampled function.

Specified by:
nextSamplePoint in interface SampledFunctionIterator
Returns:
the next point of the sampled function
Throws:
ExhaustedSampleException - if the sample has been exhausted
FunctionException - if the underlying function throws one


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