org.jscience.mathematics.analysis.interpolation
Class DoubleCubicSplineInterpolator

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

public class DoubleCubicSplineInterpolator
extends java.lang.Object
implements PrimitiveInterpolator

DOCUMENT ME!


Constructor Summary
  DoubleCubicSplineInterpolator(double[] x, double[] y)
          Creates a new DoubleCubicSplineInterpolator object.
protected DoubleCubicSplineInterpolator(int nPoints)
          Creates a new DoubleCubicSplineInterpolator object.
 
Method Summary
protected  void calcDeriv()
          DOCUMENT ME!
protected  double[] getDeriv()
          DOCUMENT ME!
 double map(double xx)
          DOCUMENT ME!
protected static double map(double xx, double[] x, double[] y, double[] deriv)
          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.
protected static DoubleCubicSplineInterpolator[] oneDarray(int n, int m)
          DOCUMENT ME!
protected  void resetData(double[] x, double[] y)
          DOCUMENT ME!
 ValuedPair samplePointAt(int index)
          Get the abscissa and value of the sample at the specified index.
protected  void setDeriv(double[] deriv)
          DOCUMENT ME!
protected  void setDeriv(double yp1, double ypn)
          DOCUMENT ME!
protected  void setDerivLimits()
          DOCUMENT ME!
protected  void setDerivLimits(double yp1, double ypn)
          DOCUMENT ME!
 int size()
          Get the number of points in the sample.
protected static DoubleCubicSplineInterpolator zero(int n)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleCubicSplineInterpolator

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

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

DoubleCubicSplineInterpolator

protected DoubleCubicSplineInterpolator(int nPoints)
Creates a new DoubleCubicSplineInterpolator object.

Parameters:
nPoints - 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

resetData

protected void resetData(double[] x,
                         double[] y)
DOCUMENT ME!

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

zero

protected static DoubleCubicSplineInterpolator zero(int n)
DOCUMENT ME!

Parameters:
n - DOCUMENT ME!
Returns:
DOCUMENT ME!

oneDarray

protected static DoubleCubicSplineInterpolator[] oneDarray(int n,
                                                           int m)
DOCUMENT ME!

Parameters:
n - DOCUMENT ME!
m - DOCUMENT ME!
Returns:
DOCUMENT ME!

setDerivLimits

protected void setDerivLimits(double yp1,
                              double ypn)
DOCUMENT ME!

Parameters:
yp1 - DOCUMENT ME!
ypn - DOCUMENT ME!

setDerivLimits

protected void setDerivLimits()
DOCUMENT ME!


setDeriv

protected void setDeriv(double yp1,
                        double ypn)
DOCUMENT ME!

Parameters:
yp1 - DOCUMENT ME!
ypn - DOCUMENT ME!

getDeriv

protected double[] getDeriv()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDeriv

protected void setDeriv(double[] deriv)
DOCUMENT ME!

Parameters:
deriv - DOCUMENT ME!

calcDeriv

protected void calcDeriv()
DOCUMENT ME!


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.

map

protected static double map(double xx,
                            double[] x,
                            double[] y,
                            double[] deriv)
DOCUMENT ME!

Parameters:
xx - DOCUMENT ME!
x - DOCUMENT ME!
y - DOCUMENT ME!
deriv - DOCUMENT ME!
Returns:
DOCUMENT ME!

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