org.spaceroots.mantissa.functions.scalar
Interface SampledFunction

All Superinterfaces:
Serializable
All Known Implementing Classes:
ComputableFunctionSampler

public interface SampledFunction
extends Serializable

This interface represent sampled scalar functions.

A function sample is an ordered set of points of the form (x, y) where x is the abscissa of the point and y is the function value at x. It is typically a function that has been computed by external means or the result of measurements.

The ComputableFunctionSampler class can be used to transform classes implementing the ComputableFunction interface into classes implementing this interface.

Sampled functions cannot be directly handled by integrators implementing the SampledFunctionIntegrator. These integrators need a SampledFunctionIterator object to iterate over the sample.

Version:
$Id: SampledFunction.java 1709 2006-12-03 21:16:50Z luc $
Author:
L. Maisonobe
See Also:
SampledFunctionIterator, ComputableFunctionSampler, ComputableFunction

Method Summary
 ScalarValuedPair samplePointAt(int index)
          Get the abscissa and value of the sample at the specified index.
 int size()
          Get the number of points in the sample.
 

Method Detail

size

public int size()
Get the number of points in the sample.

Returns:
number of points in the sample

samplePointAt

public ScalarValuedPair samplePointAt(int index)
                               throws ArrayIndexOutOfBoundsException,
                                      FunctionException
Get the abscissa and value of the sample at the specified index.

Parameters:
index - index in the sample, should be between 0 and size() - 1
Returns:
abscissa and value of the sample at the specified index
Throws:
ArrayIndexOutOfBoundsException - if the index is wrong
FunctionException - if an eventual underlying function throws one


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