rsl_interpolation/
lib.rs

1//! A re-write of [`GSL's Interpolation`] in Rust.
2//!
3//! [`GSL's Interpolation`]: https://www.gnu.org/software/gsl/doc/html/interp.html
4//!
5//! # 1D Interpolation Types
6//!
7//! + [Linear]
8//! + [Cubic]
9//! + [CubicPeriodic]
10//! + [Akima]
11//! + [AkimaPeriodic]
12//! + [Steffen]
13//!
14//! # 2D Interpolation Types
15//!
16//! + [Bilinear]
17//! + [Bicubic]
18//!
19//! # Higher level Interface
20//!
21//! + [Spline]
22//! + [Spline2d]
23//!
24#![allow(rustdoc::broken_intra_doc_links)]
25#![doc = include_str!("../TODO.md")]
26
27mod accel;
28mod error;
29mod interp;
30mod interp2d;
31mod types;
32
33mod spline;
34mod spline2d;
35
36pub use accel::Accelerator;
37
38pub use error::*;
39pub use interp::{InterpType, Interpolation};
40pub use interp2d::{Interp2dType, Interpolation2d, z_get, z_idx, z_set};
41
42pub use spline::Spline;
43pub use spline2d::Spline2d;
44
45pub use types::*;
46
47#[cfg(test)]
48mod tests;
49
50/// Trait for supported data types.
51pub trait Num: num::Float + num_traits::NumAssignOps {}
52
53impl Num for f64 {}
54impl Num for f32 {}