Interpolates (or extrapolates) a given polynomial (with associated error estimate) in one variable using a polynomial of degree n-1 when we are provided with n interpolation points.
yCoordinates which lie in the corresponding position.tabulationPointsInX. The first point of this array is the value of the given polynomial evaluated at the point tabulationPointsInX[0], th second point of the array is the value of the given polynomial at the point tabulationPointsInX[1].Returns an array of two values the first being the value of the interpolation function evaluated at the interpolation point and the other being the error estimate.
If P(x) is the polynomial of degree n-1 such that P(xCoordinates[i])
= yCoordinates[i]; i=0,...,n-1; then if the desired point at which the interpolation
functions value is required is interpolationPoint. Then the returned value will
be some double value y, where y = P(interpolationPoint).
Remark: If either of the arrays tabulationPointsInX or polynomialValues,
have differing lengths then the length of the shorter array will be taken as reference. In this case the number of interpolation
points used will correspond to the length of the shorter array where the elements of the longer array with a higher
index being ignored.
| Exception Type | Condition |
|---|---|
| InterpolationException | Thrown when the input values do not meet the requirements mentioned above. |
Interpolation Class | Interpolation Namespace