murk_space/lib.rs
1//! Spatial data structures for Murk simulations.
2//!
3//! This crate defines the [`Space`] trait — the central spatial abstraction
4//! through which all propagators, observations, and region queries flow —
5//! along with concrete lattice backends and region planning types.
6//!
7//! # Backends
8//!
9//! - [`Line1D`]: 1D line with configurable [`EdgeBehavior`] (absorb, clamp, wrap)
10//! - [`Ring1D`]: 1D ring (always-wrap periodic boundary)
11//! - [`Square4`]: 2D grid, 4-connected (N/S/E/W), Manhattan distance
12//! - [`Square8`]: 2D grid, 8-connected (+ diagonals), Chebyshev distance
13//! - [`Hex2D`]: 2D hexagonal lattice, 6-connected, cube distance
14//! - [`Fcc12`]: 3D face-centred cubic lattice, 12-connected, isotropic
15//! - [`ProductSpace`]: Cartesian product of arbitrary spaces
16//!
17//! # Region Planning
18//!
19//! Spatial queries are expressed as [`RegionSpec`] values and compiled to
20//! [`RegionPlan`] for O(1) lookups during tick execution.
21
22#![deny(missing_docs)]
23#![deny(rustdoc::broken_intra_doc_links)]
24#![forbid(unsafe_code)]
25
26pub mod edge;
27pub mod error;
28pub mod fcc12;
29pub(crate) mod grid2d;
30pub mod hex2d;
31pub mod line1d;
32pub mod product;
33pub mod region;
34pub mod ring1d;
35pub mod space;
36pub mod square4;
37pub mod square8;
38
39#[cfg(test)]
40pub(crate) mod compliance;
41
42pub use edge::EdgeBehavior;
43pub use error::SpaceError;
44pub use fcc12::Fcc12;
45pub use hex2d::Hex2D;
46pub use line1d::Line1D;
47pub use product::{ProductMetric, ProductSpace};
48pub use region::{BoundingShape, RegionPlan, RegionSpec};
49pub use ring1d::Ring1D;
50pub use space::Space;
51pub use square4::Square4;
52pub use square8::Square8;