Module: InterpolationAlgorithm

The interface for interpolation algorithms.
Source:
See:
  • LagrangePolynomialApproximation
  • LinearApproximation
  • HermitePolynomialApproximation

Members

(static) type :String

Gets the name of this interpolation algorithm.
Type:
  • String
Source:

Methods

(static) getRequiredDataPoints(degree) → {Number}

Given the desired degree, returns the number of data points required for interpolation.
Parameters:
Name Type Description
degree Number The desired degree of interpolation.
Source:
Returns:
The number of required data points needed for the desired degree of interpolation.
Type
Number

(static) interpolate(x, xTable, yTable, yStride, inputOrder, outputOrder, resultopt) → {Array.<Number>}

Performs higher order interpolation. Not all interpolators need to support high-order interpolation, if this function remains undefined on implementing objects, interpolateOrderZero will be used instead.
Parameters:
Name Type Attributes Description
x Number The independent variable for which the dependent variables will be interpolated.
xTable Array.<Number> The array of independent variables to use to interpolate. The values in this array must be in increasing order and the same value must not occur twice in the array.
yTable Array.<Number> The array of dependent variables to use to interpolate. For a set of three dependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}.
yStride Number The number of dependent variable values in yTable corresponding to each independent variable value in xTable.
inputOrder Number The number of derivatives supplied for input.
outputOrder Number The number of derivatives desired for output.
result Array.<Number> <optional>
An existing array into which to store the result.
Source:
Returns:
The array of interpolated values, or the result parameter if one was provided.
Type
Array.<Number>

(static) interpolateOrderZero(x, xTable, yTable, yStride, resultopt) → {Array.<Number>}

Performs zero order interpolation.
Parameters:
Name Type Attributes Description
x Number The independent variable for which the dependent variables will be interpolated.
xTable Array.<Number> The array of independent variables to use to interpolate. The values in this array must be in increasing order and the same value must not occur twice in the array.
yTable Array.<Number> The array of dependent variables to use to interpolate. For a set of three dependent values (p,q,w) at time 1 and time 2 this should be as follows: {p1, q1, w1, p2, q2, w2}.
yStride Number The number of dependent variable values in yTable corresponding to each independent variable value in xTable.
result Array.<Number> <optional>
An existing array into which to store the result.
Source:
Returns:
The array of interpolated values, or the result parameter if one was provided.
Type
Array.<Number>