public class RiemannIntegratorSampler extends java.lang.Object implements SampledFunctionIterator
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.
RiemannIntegrator| Constructor and Description |
|---|
RiemannIntegratorSampler(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 RiemannIntegratorSampler(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.