|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.imsl.math.Spline2D com.imsl.math.Spline2DInterpolate
public class Spline2DInterpolate
Computes a two-dimensional, tensor-product spline interpolant from two-dimensional, tensor-product data.
The class Spline2DInterpolate
computes a tensor-product spline
interpolant. The tensor-product spline interpolant to data
, where
and
has the form
xOrder
and yOrder
in the constructor. Likewise,
and are the corresponding knot sequences (xKnots
and
yKnots
). These default values are selected by
Spline2DInterpolate
. The algorithm requires that
Tensor-product spline interpolants in two dimensions can be computed quite
efficiently by solving (repeatedly) two univariate interpolation problems.
The computation is motivated by the following observations. It is necessary to solve the system of equations
Setting note that for each fixed i from 0 to , we have linear equations in the same number of unknowns as can be seen below: Setting note that for each fixed i from 0 to , we have linear equations in the same number of unknowns as can be seen below: The same matrix appears in all of the equations above: Thus, only factor this matrix once and then apply this factorization to the right-hand sides. Once this is done and is computed, then solve for the coefficients using the relation for n from 0 to , which again involves one factorization and solutions to the different right-hand sides. The classSpline2DInterpolate
is based on the
routine SPLI2D by de Boor (1978, p. 347).
Constructor Summary | |
---|---|
Spline2DInterpolate(double[] xData,
double[] yData,
double[][] fData)
Constructor for Spline2DInterpolate . |
|
Spline2DInterpolate(double[] xData,
double[] yData,
double[][] fData,
int xOrder,
int yOrder)
Constructor for Spline2DInterpolate . |
|
Spline2DInterpolate(double[] xData,
double[] yData,
double[][] fData,
int xOrder,
int yOrder,
double[] xKnots,
double[] yKnots)
Constructor for Spline2DInterpolate . |
Method Summary |
---|
Methods inherited from class com.imsl.math.Spline2D |
---|
derivative, derivative, getCoefficients, getXKnots, getYKnots, integral, value, value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Spline2DInterpolate(double[] xData, double[] yData, double[][] fData)
Spline2DInterpolate
.
xData
- a double
array containing the data points
in the x-direction.yData
- a double
array containing the data points
in the y-direction.fData
- a double
matrix of size
xData.length
by yData.length
containing the values to be interpolated.public Spline2DInterpolate(double[] xData, double[] yData, double[][] fData, int xOrder, int yOrder)
Spline2DInterpolate
.
xData
- a double
array containing the data points
in the x-direction.yData
- a double
array containing the data points
in the y-direction.fData
- a double
matrix of size
xData.length
by yData.length
containing the values to be interpolated.xOrder
- an int
scalar value specifying the order
of the spline in the x-direction. xOrder
must
be at least 1. Default: xOrder
= 4,
tensor-product cubic spline.yOrder
- an int
scalar value specifying the order
of the spline in the y-direction. yOrder
must
be at least 1. Default: yOrder
= 4,
tensor-product cubic spline.public Spline2DInterpolate(double[] xData, double[] yData, double[][] fData, int xOrder, int yOrder, double[] xKnots, double[] yKnots)
Spline2DInterpolate
.
xData
- a double
array containing the data points
in the x-direction.yData
- a double
array containing the data points
in the y-direction.fData
- a double
matrix of size
xData.length
by yData.length
containing the values to be interpolated.xOrder
- an int
scalar value specifying the order
of the spline in the x-direction. xOrder
must
be at least 1. Default: xOrder
= 4,
tensor-product cubic spline.yOrder
- an int
scalar value specifying the order
of the spline in the y-direction. yOrder
must
be at least 1. Default: yOrder
= 4,
tensor-product cubic spline.xKnots
- a double
array of size
xData.length + xOrder
specifying the knot
sequences of the spline in the x-direction. Default knot
sequences are selected by the class.yKnots
- a double
array of size
yData.length + yOrder
specifying the knot
sequences of the spline in the y-direction. Default knot
sequences are selected by the class.
|
JMSLTM Numerical Library 6.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |