#interpolation #multi-dimensional #numerical #approximation #multilinear

ninterp

Numerical interpolation in N-dimensions over a regular, sorted, nonrepeating grid

3 unstable releases

0.2.1 Jan 24, 2025
0.2.0 Jan 23, 2025
0.1.0 Nov 27, 2024

#683 in Math

Download history 114/week @ 2024-11-23 79/week @ 2024-11-30 102/week @ 2024-12-07 60/week @ 2024-12-14 72/week @ 2024-12-21 269/week @ 2024-12-28 243/week @ 2025-01-04 156/week @ 2025-01-11 387/week @ 2025-01-18 535/week @ 2025-01-25 235/week @ 2025-02-01 201/week @ 2025-02-08

1,362 downloads per month
Used in 3 crates (via routee-compass-powertrain)

BSD-3-Clause

69KB
1.5K SLoC

ninterp

docs.rs Crates.io Version GitHub

The ninterp crate provides multivariate interpolation over a regular, sorted, nonrepeating grid of any dimensionality. A variety of interpolation strategies are implemented, however more are likely to be added. Extrapolation beyond the range of the supplied coordinates is supported for 1-D linear interpolators, using the slope of the nearby points.

There are hard-coded interpolators for lower dimensionalities (up to N = 3) for better runtime performance.

All interpolation is handled through instances of the Interpolator enum, with the selected tuple variant containing relevant data. Interpolation is executed by calling Interpolator::interpolate.

Feature Flags

  • serde: support for serde

Getting Started

See the Interpolator enum documentation for examples and notes on usage.

Dependencies

~2–2.8MB
~56K SLoC