org.jscience.mathematics.analysis.interpolation
Class DoubleLinearSplineInterpolator

java.lang.Object
  extended by org.jscience.mathematics.analysis.interpolation.DoubleLinearSplineInterpolator
All Implemented Interfaces:
AbstractMapping, PrimitiveInterpolator, PrimitiveMapping, SampledMapping

public class DoubleLinearSplineInterpolator
extends java.lang.Object
implements PrimitiveInterpolator

DOCUMENT ME!


Constructor Summary
DoubleLinearSplineInterpolator(double[] x, double[] y)
          Creates a new DoubleLinearSplineInterpolator object.
 
Method Summary
 double map(double xx)
          DOCUMENT ME!
 double map(float x)
          DOCUMENT ME!
 double map(int x)
          DOCUMENT ME!
 double map(long x)
          DOCUMENT ME!
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleLinearSplineInterpolator

public DoubleLinearSplineInterpolator(double[] x,
                                      double[] y)
Creates a new DoubleLinearSplineInterpolator object.

Parameters:
x - DOCUMENT ME!
y - DOCUMENT ME!
Method Detail

size

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

Specified by:
size in interface SampledMapping
Returns:
number of points in the sample

numInputDimensions

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

Specified by:
numInputDimensions in interface SampledMapping
Returns:
dimension

numOutputDimensions

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

Specified by:
numOutputDimensions in interface SampledMapping
Returns:
dimension

map

public double map(int x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMapping
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

map

public double map(long x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMapping
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

map

public double map(float x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMapping
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!

map

public double map(double xx)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMapping
Parameters:
xx - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
org.jscience.mathematics.analysis.IntervalList.

samplePointAt

public ValuedPair samplePointAt(int index)
Get the abscissa and value of the sample at the specified index.

Specified by:
samplePointAt in interface SampledMapping
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