rustyqlib/core/interpolation/mod.rs
1//! Interpolation toolkit, one scheme per file — the single home for
2//! every interpolation in the library (curves, smiles, surfaces) and a
3//! standalone toolkit in its own right.
4//!
5//! **1-D:**
6//! - [`linear`]: piecewise linear with flat extrapolation — the pillar
7//! bracketing used by discount curves and smile interpolation;
8//! - [`cubic_spline`]: C2 cubic splines with **Natural**, **Clamped**
9//! and **Not-a-Knot** boundary conditions;
10//! - [`pchip`]: Fritsch-Carlson monotone cubic Hermite (PCHIP) —
11//! shape-preserving, no overshoot on monotone data (the safe choice
12//! for zero curves and CDF-like data);
13//! - [`akima`]: Akima's spline — local, outlier-robust slopes with far
14//! less oscillation than a global cubic fit.
15//!
16//! **2-D (volatility grids):**
17//! - [`bilinear`]: rectangular-grid bilinear interpolation with flat
18//! extrapolation;
19//! - [`thin_plate`]: bivariate thin-plate spline (RBF) on scattered
20//! points, with optional smoothing — for irregular vol quote grids.
21//!
22//! Related: [`linalg`](crate::core::linalg) holds the nearest-correlation
23//! projection (Higham) used to repair empirical correlation surfaces.
24
25pub mod akima;
26pub mod bilinear;
27pub mod cubic_spline;
28pub mod linear;
29pub mod pchip;
30pub mod thin_plate;
31
32pub use akima::Akima;
33pub use bilinear::BilinearGrid;
34pub use cubic_spline::{BoundaryCondition, CubicSpline};
35pub use linear::{bracket, interp_pairs, lerp, linear_interp};
36pub use pchip::Pchip;
37pub use thin_plate::ThinPlateSpline;