apbase/lib.rs
1//! APbase: high-performance automatic map generation.
2//!
3//! The public top-level API is intentionally small: use [`Map`] or
4//! [`create_map`] to create maps, and [`config`](static@config) for process-wide runtime
5//! settings. Lower-level geostatistical building blocks remain available from
6//! their dedicated modules.
7//!
8//! ```no_run
9//! use apbase::{Map, MapOptions};
10//!
11//! # fn load() -> (Vec<f64>, Vec<f64>, Vec<f64>) { unimplemented!() }
12//! let (x, y, z) = load();
13//! apbase::config.set("n_threads", 4)?;
14//!
15//! let result = Map::new(MapOptions::new(10.0)).call(&x, &y, &z)?;
16//! println!("{}", result.method); // "idw" or "kriging"
17//! let (raster_x, raster_y, raster_z) = result.to_raster()?; // NaN outside the boundary
18//! # let _ = (raster_x, raster_y, raster_z);
19//!
20//! let result = apbase::create_map(&x, &y, &z, MapOptions::new(10.0))?;
21//! # let _ = result;
22//! # Ok::<(), apbase::common::ApbaseError>(())
23//! ```
24
25mod _native;
26pub mod cokriging;
27pub mod common;
28pub mod config;
29pub mod cross_validate;
30pub mod cross_variogram;
31pub mod filtering;
32pub mod grid;
33pub mod idw;
34pub mod kriging;
35pub mod mapping;
36pub mod variogram;
37
38pub use config::config;
39pub use mapping::{Map, MapOptions, MapResult, create_map};
40
41/// Package version.
42#[allow(non_upper_case_globals)]
43pub const __version__: &str = env!("CARGO_PKG_VERSION");