Skip to main content

Module grid

Module grid 

Source
Expand description

Discrete grid storage, cell model, and edit/build errors. Rectangular 4-connected map substrate shared by all discrete grid lanes.

Grid owns walkability (Cell), positive per-cell Grid::traversal_cost, and an optional [reachability::GridReachabilityIndex] for early same-component checks. Walkability edits invalidate that index; rebuild it with Grid::index_reachability. Prefer GridBuilder / Grid::builder for bulk construction, or Grid::try_from_rows / grid! for small textual fixtures.

Modules§

reachability
Optional same-component reachability index for early no-path rejection. Optional connected-component index for walkable cells on a Grid.

Structs§

Grid
Dense row-major rectangular map: walkability, traversal_cost, optional reachability.
GridBuilder
Builder for applying validated bulk edits to a new Grid.

Enums§

Cell
Walkability state of a single grid cell.
GridBuildError
Error returned when a grid cannot be constructed.
GridEditError
Error returned when a requested grid edit violates grid invariants.
GridStorage
Storage buffer that could not be allocated while constructing a grid.