0

Doc says:

"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])"

I do not understand this part, why is returned polynomials[j](x - knot[j]) and not polynomials[j](x) ?

  • Probably because the j-th polynomial is defined between 0 and (knot[j+1]-knot[j]). – fang Nov 30 '15 at 00:29
  • @fang This assumption is not documented anywhere in the javadoc. Seems strange to be defined like that. I thought the splines are cubic polynomials defined on each interval (knot[j],knot[j+1]). In the javadoc they said "The cubic spline interpolation algorithm implemented is as described in R.L. Burden, J.D. Faires, Numerical Analysis, 4th Ed., 1989, PWS-Kent, ISBN 0-53491-585-X, pp 126-131." I have the 9-th edition and at page 146 the definition given is that the cubic spline is defined exactly on (knot[j],knot[j+1]). – Sorin Ciolofan Dec 01 '15 at 17:15

0 Answers0