`PolynomialSplineFunction`

which is a `UnivariateRealFunction`

. So you can calculate the value within the range of your source data like this:
splines.value(x)]]>

Taking the case of the natural cubic spline interpolation, how is one to fetch the values from the interpolation?

double[] x = new double[] {1, 5, 7, 10, 12, 15, 18, 20};

double[] y = new double[] {229.49, 233.36, 235.64, 242.09, 240.29, 259.16, 254.85, 261.27};

SplineInterpolator interpolator = new SplineInterpolator();

PolynomialSplineFunction splines = interpolator.interpolate(x, y);

Thanks in advance.

]]>Thank you… ]]>