Crate rusty_fitpack

source ·
Expand description

Rusty FITPACK provides the 1D routines for spline interpolation and fitting in Rust. The functions are translated from the original Fortran77 code FITPACK by Paul Dierckx. This packages provides almost the same interface as the SciPy wrapper for FITPACK. In concrete terms, the package implements three functions, splrep, splev and splev_uniform.

References

Based on algorithms described by Paul Dierckx in Ref [1-4]:

[1] P. Dierckx, “An algorithm for smoothing, differentiation and integration of experimental data using spline functions”, J.Comp.Appl.Maths 1 (1975) 165-184.

[2] P. Dierckx, “A fast algorithm for smoothing data on a rectangular grid while using spline functions”, SIAM J.Numer.Anal. 19 (1982) 1286-1304.

[3] P. Dierckx, “An improved algorithm for curve fitting with spline functions”, report tw54, Dept. Computer Science,K.U. Leuven, 1981.

[4] P. Dierckx, “Curve and surface fitting with splines”, Monographs on Numerical Analysis, Oxford University Press, 1993.

Modules

Functions

  • The function splder evaluates a number of points $x(i)$ with $i=1,2,…,m$ the derivative of order nu of a spline $s(x)$ of degree $k$, given in its B-spline representation.
  • The function splder_uniform evaluates in a point x the derivative of order nu of a spline $s(x)$ of degree $k$, given in its of degree k given in its B-spline representation.
  • The function splev evaluates a number of points $x(i)$ with $i=1,2,…,m$ a spline $s(x)$ of degree $k$, given in its B-spline representation.
  • The function splev_uniform evaluates a single point $x$ of a spline $s(x)$ of degree $k$, given in its B-spline representation. The functions assumes that the knots t are spaced uniformly so that the interval $t_i <= x < t_(i+1)$ can be found without iterating over all knots
  • Find the B-spline representation of a 1-D curve. Given the set of data points $(x(i), y(i))$ determine a smooth spline approximation of degree k on the interval $xb <= x <= xe$.