Skip to main content

Module interpolate

Module interpolate 

Source
Expand description

Interpolation primitives (linear, cubic spline). Interpolation & Curve Fitting

Provides deterministic interpolation and polynomial fitting primitives:

  • Piecewise linear interpolation
  • Nearest-neighbor interpolation
  • Least-squares polynomial fitting (via Vandermonde + QR)
  • Polynomial evaluation (Horner’s method)
  • Natural cubic spline interpolation

§Determinism Contract

All summation reductions use BinnedAccumulatorF64 for bit-identical results across platforms and execution orders. No HashMap or non-deterministic iteration is used.

Structs§

CubicSpline
Natural cubic spline representation.

Functions§

interp1d_linear
Piecewise linear interpolation.
interp1d_nearest
Nearest-neighbor interpolation.
polyfit
Least-squares polynomial fit of given degree.
polyval
Evaluate polynomial at given points using Horner’s method.
spline_cubic_natural
Construct a natural cubic spline (second derivative = 0 at boundaries).
spline_eval
Evaluate a cubic spline at query points.