numra-interp
Interpolation for the Numra workspace — linear, cubic spline, PCHIP, Akima, and barycentric Lagrange under a common Interpolant trait.
1D interpolation methods chosen for the property they preserve: PCHIP for monotonicity, Akima for robustness to outliers, cubic spline for smoothness, barycentric Lagrange for stable polynomial interpolation over Chebyshev nodes.
Example
use ;
let x = vec!;
let y = vec!;
// PCHIP preserves monotonic data — the interpolant won't overshoot
let pchip = interp1d.unwrap;
let mid = pchip.interpolate;
assert!;
What's in this crate
Linear— piecewise linearCubicSpline— natural, clamped, and not-a-knot boundary variantsPchip— piecewise cubic Hermite (monotonicity-preserving)Akima— piecewise cubic, tolerant of outliersBarycentricLagrange— stable polynomial interpolationInterpolanttrait —interpolate,interpolate_vec, optionalderivativeandintegrateinterp1d— convenience constructor byInterp1dMethod
Composes with
numra-ode— resampling ODE trajectories onto arbitrary pointsnumra-sde— resampling sample paths onto common gridsnumra-integrate— quadrature against an interpolantnumra-fit— comparing parametric fits against non-parametric interpolants
See interop workflows for the verified ODE → cubic spline → quadrature workflow.
Install
[]
= "0.1"
Or via the umbrella crate:
[]
= "0.1"
Documentation
- API: https://docs.rs/numra-interp
- Book: Interpolation
- Source: https://github.com/moussaoutlook/numra-rs/tree/main/numra-interp
License
Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.