Skip to main content

Module spline

Module spline 

Source
Expand description

Natural cubic spline interpolation (the tridiagonal system for the second derivatives is solved with the Thomas algorithm) and piecewise-linear interpolation.

Structs§

CubicSpline
A natural cubic spline: second derivatives zero at both ends.

Functions§

linear_interp
Piecewise-linear interpolation of (xs, ys) (xs strictly increasing) at x. Clamps to the endpoints outside the range.