org.spaceroots.mantissa.functions.vectorial
Interface SampledFunction
-
- All Superinterfaces:
- java.io.Serializable
- All Known Implementing Classes:
- ComputableFunctionSampler
public interface SampledFunction extends java.io.SerializableThis interface represent sampled vectorial 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
ComputableFunctionSamplerclass can be used to transform classes implementing theComputableFunctioninterface into classes implementing this interface.Sampled functions cannot be directly handled by integrators implementing the
SampledFunctionIntegrator. These integrators need aSampledFunctionIteratorobject to iterate over the sample.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description intgetDimension()Get the dimension of the vectorial values of the function.VectorialValuedPairsamplePointAt(int index)Get the abscissa and value of the sample at the specified index.intsize()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
-
getDimension
int getDimension()
Get the dimension of the vectorial values of the function.- Returns:
- dimension
-
samplePointAt
VectorialValuedPair samplePointAt(int index) throws java.lang.ArrayIndexOutOfBoundsException, FunctionException
Get the abscissa and value of the sample at the specified index.- Parameters:
index- index in the sample, should be between 0 andsize()- 1- Returns:
- abscissa and value of the sample at the specified index
- Throws:
java.lang.ArrayIndexOutOfBoundsException- if the index is wrongFunctionException- if an eventual underlying function throws one
-
-
DataMelt 3.0 © DataMelt by jWork.ORG