Expand description
Spatial data structures for Murk simulations.
This crate defines the Space trait — the central spatial abstraction
through which all propagators, observations, and region queries flow —
along with concrete lattice backends and region planning types.
§Backends
Line1D: 1D line with configurableEdgeBehavior(absorb, clamp, wrap)Ring1D: 1D ring (always-wrap periodic boundary)Square4: 2D grid, 4-connected (N/S/E/W), Manhattan distanceSquare8: 2D grid, 8-connected (+ diagonals), Chebyshev distanceHex2D: 2D hexagonal lattice, 6-connected, cube distanceFcc12: 3D face-centred cubic lattice, 12-connected, isotropicProductSpace: Cartesian product of arbitrary spaces
§Region Planning
Spatial queries are expressed as RegionSpec values and compiled to
RegionPlan for O(1) lookups during tick execution.
Re-exports§
pub use edge::EdgeBehavior;pub use error::SpaceError;pub use fcc12::Fcc12;pub use hex2d::Hex2D;pub use line1d::Line1D;pub use product::ProductMetric;pub use product::ProductSpace;pub use region::BoundingShape;pub use region::RegionPlan;pub use region::RegionSpec;pub use ring1d::Ring1D;pub use space::Space;pub use square4::Square4;pub use square8::Square8;
Modules§
- edge
- Spatial edge (boundary) behavior for lattice backends.
- error
- Error types for space operations.
- fcc12
- 3D face-centred cubic (FCC) lattice with 12-connected neighbourhood.
- hex2d
- 2D hexagonal lattice with axial coordinates (pointy-top orientation).
- line1d
- 1D line lattice with configurable edge behavior.
- product
- Cartesian product of arbitrary spaces.
- region
- Region specification and compiled region plans.
- ring1d
- 1D ring lattice (always-wrap periodic boundary).
- space
- The core
Spacetrait anddyn Spacedowncast support. - square4
- 2D square grid with 4-connected neighbourhood (N/S/E/W).
- square8
- 2D square grid with 8-connected neighbourhood (cardinal + diagonal).