-
Notifications
You must be signed in to change notification settings - Fork 7
Akima.Function.computeAkimaPolyCoefficients
commons-math-interpolation / Akima / computeAkimaPolyCoefficients
function computeAkimaPolyCoefficients(xVals, yVals): Float64Array<ArrayBufferLike>[];Defined in: Akima.ts:71
Computes the polynomial coefficients for the Akima cubic spline interpolation of a dataset.
ArrayLike<number>
The arguments of the interpolation points, in strictly increasing order. The values must be finite.
ArrayLike<number>
The values of the interpolation points.
Float64Array<ArrayBufferLike>[]
The polynomial coefficients of the xVals.length - 1 segments.
Element i contains the coefficients of the segment from xVals[i] to xVals[i + 1],
in ascending order (up to 4 coefficients) and relative to xVals[i].
Zero coefficients of the highest orders are trimmed.
The result can be evaluated with evaluatePolySegment.
Error
If xVals and yVals have different lengths, if there are fewer than 5 points,
or if xVals contains non-finite values or is not strictly increasing.