org.jscience.mathematics.analysis.interpolation
Class DoubleCubicSplineInterpolator2D

java.lang.Object
  extended by org.jscience.mathematics.analysis.interpolation.DoubleCubicSplineInterpolator2D
All Implemented Interfaces:
AbstractMapping, PrimitiveInterpolatorND, PrimitiveMappingND, SampledMapping

public class DoubleCubicSplineInterpolator2D
extends java.lang.Object
implements PrimitiveInterpolatorND

DOCUMENT ME!


Constructor Summary
  DoubleCubicSplineInterpolator2D(double[] x1, double[] x2, double[][] y)
          Creates a new DoubleCubicSplineInterpolator2D object.
protected DoubleCubicSplineInterpolator2D(int nP, int mP)
          Creates a new DoubleCubicSplineInterpolator2D object.
 
Method Summary
protected  void calcDeriv()
          DOCUMENT ME!
protected  double[][] getDeriv()
          DOCUMENT ME!
 double[] map(double[] x)
          DOCUMENT ME!
 double map(double xx1, double xx2)
          DOCUMENT ME!
 double[] map(float[] x)
          DOCUMENT ME!
 double[] map(int[] x)
          DOCUMENT ME!
 double[] map(long[] x)
          DOCUMENT ME!
 int numInputDimensions()
          The dimension of variable parameter.
 int numOutputDimensions()
          The dimension of the result values.
protected static DoubleCubicSplineInterpolator2D[] oneDarray(int nP, int mP, int lP)
          DOCUMENT ME!
protected  void resetData(double[] x1, double[] x2, double[][] y)
          DOCUMENT ME!
 ValuedPair samplePointAt(int index)
          Get the abscissa and value of the sample at the specified index.
 void setDeriv(double[][] d2ydx2)
          DOCUMENT ME!
 int size()
          Get the number of points in the sample.
protected static DoubleCubicSplineInterpolator2D zero(int nP, int mP)
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleCubicSplineInterpolator2D

public DoubleCubicSplineInterpolator2D(double[] x1,
                                       double[] x2,
                                       double[][] y)
Creates a new DoubleCubicSplineInterpolator2D object.

Parameters:
x1 - DOCUMENT ME!
x2 - DOCUMENT ME!
y - DOCUMENT ME!

DoubleCubicSplineInterpolator2D

protected DoubleCubicSplineInterpolator2D(int nP,
                                          int mP)
Creates a new DoubleCubicSplineInterpolator2D object.

Parameters:
nP - DOCUMENT ME!
mP - DOCUMENT ME!
Method Detail

numInputDimensions

public int numInputDimensions()
The dimension of variable parameter. Should be a strictly positive integer.

Specified by:
numInputDimensions in interface PrimitiveMappingND
Specified by:
numInputDimensions in interface SampledMapping
Returns:
DOCUMENT ME!

numOutputDimensions

public int numOutputDimensions()
The dimension of the result values. Should be inferior or equal to numInputDimensions(). Should be a strictly positive integer.

Specified by:
numOutputDimensions in interface PrimitiveMappingND
Specified by:
numOutputDimensions in interface SampledMapping
Returns:
DOCUMENT ME!

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

resetData

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

Parameters:
x1 - DOCUMENT ME!
x2 - DOCUMENT ME!
y - DOCUMENT ME!

zero

protected static DoubleCubicSplineInterpolator2D zero(int nP,
                                                      int mP)
DOCUMENT ME!

Parameters:
nP - DOCUMENT ME!
mP - DOCUMENT ME!
Returns:
DOCUMENT ME!

oneDarray

protected static DoubleCubicSplineInterpolator2D[] oneDarray(int nP,
                                                             int mP,
                                                             int lP)
DOCUMENT ME!

Parameters:
nP - DOCUMENT ME!
mP - DOCUMENT ME!
lP - DOCUMENT ME!
Returns:
DOCUMENT ME!

calcDeriv

protected void calcDeriv()
DOCUMENT ME!


getDeriv

protected double[][] getDeriv()
DOCUMENT ME!

Returns:
DOCUMENT ME!

setDeriv

public void setDeriv(double[][] d2ydx2)
DOCUMENT ME!

Parameters:
d2ydx2 - DOCUMENT ME!

map

public double[] map(int[] x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMappingND
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

map

public double[] map(long[] x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMappingND
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

map

public double[] map(float[] x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMappingND
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.IllegalArgumentException - DOCUMENT ME!

map

public double[] map(double[] x)
DOCUMENT ME!

Specified by:
map in interface PrimitiveMappingND
Parameters:
x - DOCUMENT ME!
Returns:
DOCUMENT ME!
See Also:
org.jscience.mathematics.analysis.Domain.

map

public double map(double xx1,
                  double xx2)
DOCUMENT ME!

Parameters:
xx1 - DOCUMENT ME!
xx2 - 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