Represents a polynomial spline function.
A polynomial spline function consists of a set of
interpolating polynomials and an ascending array of domain
knot points, determining the intervals over which the spline function
is defined by the constituent polynomials. The polynomials are assumed to
have been computed to match the values of another function at the knot
points. The value consistency constraints are not currently enforced by
PolynomialSplineFunction itself, but are assumed to hold among
the polynomials and knot points passed to the constructor.
N.B.: The polynomials in the polynomials property must be
centered on the knot points to compute the spline function values. See below.
The domain of the polynomial spline function is
[smallest knot, largest knot] . Attempts to evaluate the
function at values outside of this range generate IllegalArgumentExceptions.
The value of the polynomial spline function for an argument x
is computed as follows:
- The knot array is searched to find the segment to which
x
belongs. If x is less than the smallest knot point or greater
than the largest one, an IllegalArgumentException
is thrown.
- Let
j be the index of the largest knot point that is less
than or equal to x . The value returned is
polynomials[j](x - knot[j])
version: $Revision: 348761 $ $Date: 2005-11-24 09:04:20 -0700 (Thu, 24 Nov 2005) $ |