mnultitool.interpolate package

Submodules

mnultitool.interpolate.spline module

Functions:

cubicSpline(x, y)

Computes the coefficients of a third order (cubic) spline

firstOrderSpline(x, y)

Computes the coefficients of a first order spline, according to the formulas:

mnultitool.interpolate.spline.cubicSpline(x, y)

Computes the coefficients of a third order (cubic) spline

Parameters
  • x (ndarray) – function arguments (x axis)

  • y (ndarray) – function values (y axis)

Return type

Tuple`[:py:class:`float, float, float, float]

Returns

the coefficients in the tuple of shape (a0, a1, a2, a3)

mnultitool.interpolate.spline.firstOrderSpline(x, y)

Computes the coefficients of a first order spline, according to the formulas:

a_k=\frac{y_{k+1}-y_k}{x_{k+1}-x_k}

b_k=y_k-a_k*x_k

Parameters
  • x (ndarray) – function arguments (x axis)

  • y (ndarray) – function values (y axis)

Returns

the coefficients of the linear function in the tuple of shape (a0, a1)

mnultitool.interpolate.utils module

Functions:

chebyshevNodes([n])

Creates a vector of Chebyshev nodes in the shape of (n+1, )

mnultitool.interpolate.utils.chebyshevNodes(n=10)

Creates a vector of Chebyshev nodes in the shape of (n+1, )

Parameters

n (int) – amount of Chebyshev nodes, a positive integer

Returns

the vector of chebyshev nodes

Return type

np.ndarray