org.jscience.mathematics.analysis.quadrature
Class EnhancedSimpsonNDIntegratorSampler

java.lang.Object
  extended by org.jscience.mathematics.analysis.quadrature.EnhancedSimpsonNDIntegratorSampler
All Implemented Interfaces:
SampledMappingIterator

public class EnhancedSimpsonNDIntegratorSampler
extends java.lang.Object
implements SampledMappingIterator

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.

See Also:
EnhancedSimpsonIntegrator

Constructor Summary
EnhancedSimpsonNDIntegratorSampler(SampledMappingIterator iter)
          Constructor.
 
Method Summary
 int getDimension()
           
 SampledMapping getSampledMapping()
          DOCUMENT ME!
 boolean hasNext()
          Check if the iterator can provide another point.
 ValuedPair next()
          Get the next point of a sampled function.
 void remove()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnhancedSimpsonNDIntegratorSampler

public EnhancedSimpsonNDIntegratorSampler(SampledMappingIterator iter)
                                   throws ExhaustedSampleException,
                                          MappingException
Constructor. Build an integrator from an underlying sample iterator.

Parameters:
iter - iterator over the base function
Throws:
ExhaustedSampleException
MappingException
Method Detail

getSampledMapping

public SampledMapping getSampledMapping()
Description copied from interface: SampledMappingIterator
DOCUMENT ME!

Specified by:
getSampledMapping in interface SampledMappingIterator
Returns:
DOCUMENT ME!

hasNext

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

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

getDimension

public int getDimension()

next

public ValuedPair next()
                throws ExhaustedSampleException,
                       MappingException
Description copied from interface: SampledMappingIterator
Get the next point of a sampled function.

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

remove

public void remove()
Description copied from interface: SampledMappingIterator
DOCUMENT ME!

Specified by:
remove in interface SampledMappingIterator