public abstract class BSpline extends Object implements Serializable, Cloneable
Bsplines provide a particularly convenient and suitable basis for a given class of smooth ppoly functions. Such a class is specified by giving its breakpoint sequence, its order k, and the required smoothness across each of the interior breakpoints. The corresponding Bspline basis is specified by giving its knot sequence . The specification rule is as follows: If the class is to have all derivatives up to and including the jth derivative continuous across the interior breakpoint , then the number should occur k  j  1 times in the knot sequence. Assuming that and are the endpoints of the interval of interest, choose the first k knots equal to and the last k knots equal to . This can be done because the Bsplines are defined to be right continuous near and left continuous near .
When the above construction is completed, a knot sequence of length M is generated, and there are m: = Mk Bsplines of order k, for example , spanning the ppoly functions on the interval with the indicated smoothness. That is, each ppoly function in this class has a unique representation as a linear combination of Bsplines. A Bspline is a particularly compact piecewise polynomial function. is a nonnegative function that is nonzero only on the interval . More precisely, the support of the ith Bspline is . No piecewise polynomial function in the same class (other than the zero function) has smaller support (i.e., vanishes on more intervals) than a Bspline. This makes Bsplines particularly attractive basis functions since the influence of any particular Bspline coefficient extends only over a few intervals.
Modifier and Type  Field and Description 

protected double[] 
coef
The Bspline coefficient array.

protected double[] 
knot
The knot array of length n + order, where n is the number
of coefficients in the Bspline.

protected int 
order
Order of the spline.

Constructor and Description 

BSpline() 
Modifier and Type  Method and Description 

double 
derivative(double x)
Returns the value of the first derivative of the Bspline at a point.

double[] 
derivative(double[] x,
int ideriv)
Returns the value of the derivative of the Bspline at each point of an
array.

double 
derivative(double x,
int ideriv)
Returns the value of the derivative of the Bspline at a point.

double[] 
getKnots()
Returns a copy of the knot sequence.

Spline 
getSpline()
Returns a
Spline representation of the Bspline. 
double 
integral(double a,
double b)
Returns the value of an integral of the Bspline.

double 
value(double x)
Returns the value of the Bspline at a point.

double[] 
value(double[] x)
Returns the value of the Bspline at each point of an array.

protected double[] coef
protected double[] knot
protected int order
public double derivative(double x)
x
 a double
specifying a point at which the
derivative is to be evaluateddouble
containing the value of the first
derivative of the Bspline at the point x
public double[] derivative(double[] x, int ideriv)
x
 a double
array of points at which the
derivative is to be evaluatedideriv
 an int
specifying the derivative to be
computed. If zero, the function value is returned. If
one, the first derivative is returned, etc.double
array containing the value of the
derivative the Bspline at each point of the array
x
public double derivative(double x, int ideriv)
x
 a double
specifying a point at which the
derivative is to be evaluatedideriv
 an int
specifying the derivative to be
computed. If zero, the function value is returned. If
one, the first derivative is returned, etc.double
containing the value of the derivative of
the Bspline at the point x
public double[] getKnots()
double
array containing a copy of the knot
sequence.public Spline getSpline()
Spline
representation of the Bspline.Spline
representation of the BSpline
public double integral(double a, double b)
a
 a double
specifying the lower limit of
integrationb
 a double
specifying the upper limit of
integrationdouble
which specifies the Bspline integral
value from a
to b
public double value(double x)
x
 a double
specifying the point at which the
Bspline is to be evaluateddouble
giving the value of the Bspline at the
point xpublic double[] value(double[] x)
x
 a double
array of points at which the Bspline
is to be evaluateddouble
array containing the value of the Bspline
at each point of the array x
Copyright © 19702015 Rogue Wave Software
Built October 13 2015.