Class ClampedSplineInterpolator

  • All Implemented Interfaces:
    UnivariateInterpolator

    public class ClampedSplineInterpolator
    extends SplineInterpolator
    Computes a clamped cubic spline interpolation for the data set.

    The interpolate(double[], double[], double, double) method returns a PolynomialSplineFunction consisting of n cubic polynomials, defined over the subintervals determined by the x values, x[0] < x[i] ... < x[n]. The x values are referred to as "knot points."

    The value of the PolynomialSplineFunction at a point x that is greater than or equal to the smallest knot point and strictly less than the largest knot point is computed by finding the subinterval to which x belongs and computing the value of the corresponding polynomial at x - x[i] where i is the index of the subinterval. See PolynomialSplineFunction for more details.

    The interpolating polynomials satisfy:

    1. The value of the PolynomialSplineFunction at each of the input x values equals the corresponding y value.
    2. Adjacent polynomials are equal through two derivatives at the knot points (i.e., adjacent polynomials "match up" at the knot points, as do their first and second derivatives).
    3. The clamped boundary condition, i.e., the PolynomialSplineFunction takes "a specific direction" at both its start point and its end point by providing the desired first derivative values (slopes) as function parameters to interpolate(double[], double[], double, double).

    The clamped cubic spline interpolation algorithm implemented is as described in R.L. Burden, J.D. Faires, Numerical Analysis, 9th Ed., 2010, Cengage Learning, ISBN 0-538-73351-9, pp 153-156.