public class BsInterpolate extends BSpline
Given the data points x = xData
, f = yData
,
and n the number of elements in
xData
and yData
, the default action of BsInterpolate
computes a cubic
(order = 4) spline interpolant s to the data using a default "notaknot" knot sequence.
Constructors are also provided that allow the order and knot sequence to be specified.
This algorithm is based on the routine SPLINT
by de Boor (1978, p. 204).
First, the xData
vector is sorted and the result is stored in x. The
elements of yData
are permuted appropriately and stored in f, yielding the
equivalent data for i = 0 to n1.
The following preliminary checks are performed on the data, with k = order
.
We verify that
The first test checks to see that the abscissas are distinct. The second and third inequalities verify that a valid knot sequence has been specified.
In order for the interpolation matrix to be nonsingular, we also check for i = 0 to n1. This first inequality in the last check is necessary since the method used to generate the entries of the interpolation matrix requires that the k possibly nonzero Bsplines at , where j satisfies be welldefined (that is, ).
Constructor and Description 

BsInterpolate(double[] xData,
double[] yData)
Constructs a Bspline that interpolates the given
data points.

BsInterpolate(double[] xData,
double[] yData,
int order)
Constructs a Bspline that interpolates the given data points and
order, using a default "notaknot" spline knot sequence.

BsInterpolate(double[] xData,
double[] yData,
int order,
double[] knot)
Constructs a Bspline that interpolates the given
data points, using the specified order and knots.

public BsInterpolate(double[] xData, double[] yData)
xData
 A double
array containing the xcoordinates of the data.
Values must be distinct.yData
 A double
array containing the ycoordinates of the data.
The arrays xData and yData must have the same length.public BsInterpolate(double[] xData, double[] yData, int order)
xData
 A double
array containing the xcoordinates of the
data. Values must be distinct.yData
 A double
array containing the ycoordinates of the
data.The arrays xData and yData must have the same length.order
 An int
denoting the order of the Bspline.public BsInterpolate(double[] xData, double[] yData, int order, double[] knot)
xData
 A double
array containing the xcoordinates of the
data. Values must be distinct.yData
 A double
array containing the ycoordinates of the
data.The arrays xData and yData must have the same length.order
 An int
denoting the order of the spline.knot
 A double
array containing the knot sequence for the Bspline.Copyright © 19702015 Rogue Wave Software
Built October 13 2015.