petektools 0.1.0

Standalone numerics & geostatistics kernels for Rust: scattered-data gridding (minimum-curvature, IDW, nearest) and a curated numeric front-door. Pure leaf; PyO3 bindings planned.
Documentation
//! # petekTools
//!
//! Standalone numerics & geostatistics kernels for Rust — the layer Rust is
//! missing. Mature crates cover linear algebra (`faer`), statistics/distributions
//! (`statrs`, `rand_distr`), FFT (`rustfft`) and spatial indexing (`kiddo`,
//! `rstar`), but there is **no production-grade scattered-data gridding /
//! geostatistics** crate. petekTools fills exactly that gap and curates the
//! rest behind one front-door.
//!
//! ## Charter (what belongs here — and what does not)
//! - **In:** scattered-data gridding/interpolation (minimum-curvature, IDW,
//!   nearest today; kriging / RBF later), plus thin curation over the mature
//!   numeric crates.
//! - **Out:** file I/O of any kind (that is petekio), and reservoir-domain
//!   modeling — PVT, rel-perm, material balance, decline, GRV (that is peteksim).
//!
//! ## Dependency rule: this crate is a **pure leaf**
//! It depends only on general-purpose numeric crates — never on petekio or
//! peteksim. petekio depends on petekTools (for the gridding kernels);
//! peteksim depends on both. One direction, no cycles.
//!
//! ## Type-agnostic boundary
//! Kernels speak [`Lattice`] (this crate's own geometry vocabulary) + plain
//! `[[f64; 3]]` coordinate arrays — never a consumer's domain type. petekio's
//! `GridGeometry` maps onto [`Lattice`] field-for-field, so a future delegation
//! is a 1:1 conversion at the call site, not a rewrite.
//!
//! ## Status
//! GATE-0 complete: the public contract ([`Lattice`], [`GridMethod`], [`grid`])
//! is locked, and the three gridding kernels (`nearest`, `idw`,
//! `min_curvature`) are ported from petekio 0.2.0 and analytically tested. See
//! `API.md` for the contract.

#![forbid(unsafe_code)]

pub mod container;
pub mod foundation;
pub mod gridding;
pub mod units;

// Curated top-level surface — the front-door consumers import. (Unit conversions
// stay namespaced under `units` to keep the numeric front-door uncluttered.)
pub use foundation::{AlgoError, BBox, Lattice, Result};
pub use gridding::{grid, grid_min_curvature_seeded, ConvergentGridder, GridMethod};