org.jscience.mathematics.analysis
Interface SampledMapping

All Known Subinterfaces:
NumberInterpolator, NumberInterpolatorND, PrimitiveInterpolator, PrimitiveInterpolatorND
All Known Implementing Classes:
DoubleCubicSplineInterpolator, DoubleCubicSplineInterpolator2D, DoubleCubicSplineInterpolator3D, DoubleCubicSplineInterpolatorND, DoubleLinearSplineInterpolator, PrimitiveMappingNDSampler, PrimitiveMappingSampler

public interface SampledMapping

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 PrimitiveMappingSampler class can be used to transform classes implementing the PrimitiveMapping 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.

See Also:
SampledMappingIterator, PrimitiveMappingSampler, AbstractMapping

Method Summary
 int numInputDimensions()
          Get the dimension of the input values of the function.
 int numOutputDimensions()
          Get the dimension of the output values of the function.
 ValuedPair 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

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

Returns:
number of points in the sample

numInputDimensions

int numInputDimensions()
Get the dimension of the input values of the function.

Returns:
dimension

numOutputDimensions

int numOutputDimensions()
Get the dimension of the output values of the function.

Returns:
dimension

samplePointAt

ValuedPair samplePointAt(int index)
                         throws java.lang.ArrayIndexOutOfBoundsException
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:
java.lang.ArrayIndexOutOfBoundsException - if the index is wrong