public class EnhancedSimpsonIntegratorSampler extends java.lang.Object implements SampledFunctionIterator
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.
EnhancedSimpsonIntegrator| Constructor and Description |
|---|
EnhancedSimpsonIntegratorSampler(SampledFunctionIterator iter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Check if the iterator can provide another point.
|
ScalarValuedPair |
nextSamplePoint()
Get the next point of a sampled function.
|
public EnhancedSimpsonIntegratorSampler(SampledFunctionIterator iter) throws ExhaustedSampleException, FunctionException
iter - iterator over the base functionExhaustedSampleExceptionFunctionExceptionpublic boolean hasNext()
SampledFunctionIteratorhasNext in interface SampledFunctionIteratorpublic ScalarValuedPair nextSamplePoint() throws ExhaustedSampleException, FunctionException
SampledFunctionIteratornextSamplePoint in interface SampledFunctionIteratorExhaustedSampleException - if the sample has been exhaustedFunctionException - if the underlying function throws oneCopyright © 2001-2007 Luc Maisonobe. All Rights Reserved.