An
InterpolationAlgorithm for performing Lagrange interpolation.
Methods
-
Given the desired degree, returns the number of data points required for interpolation.
Name Type Description degreeNumber The desired degree of interpolation. Returns:
The number of required data points needed for the desired degree of interpolation. -
Interpolates values using Lagrange Polynomial Approximation.
Name Type Description xNumber The independent variable for which the dependent variables will be interpolated. xTableArray.<Number> The array of independent variables to use to interpolate. The valuesin this array must be in increasing order and the same value must not occur twice in the array. yTableArray.<Number> The array of dependent variables to use to interpolate. For a set of threedependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}. yStrideNumber The number of dependent variable values in yTable corresponding toeach independent variable value in xTable. resultArray.<Number> optional An existing array into which to store the result. Returns:
The array of interpolated values, or the result parameter if one was provided.
