Expand description
Extention library for petgraph.
This adds a specialized graph for lattice (or grid) based graph structures for petgraph.
This probides a smaller and faster graph than the general purpose petgraph::Graph struct.
It can be used for path finding in tilemap based game.
This is for developing game, but it can be used for other purposes as well.
§features
§const-generic-wrap
Use const-generic-wrap to make it possible to make some
Shape to be ZST.
This needs const generics (rustc >= 1.51) to use. This is enabled by default, so if you want to use this crate with rustc < 1.51, set default-features as false.
§hex2d
Use hex2d as a
shapes::Coordinate.
See hex::hex2d for details.
Re-exports§
pub use square::SquareGraph;
Modules§
- hex
- Hex Graph. The submodules are for different Coodinate representations of Hex Graph.
- lattice_
abstract - Module for Abstract 2D Lattice Graph. It is used inside by other lattice graph in other modules like
hex. Use it when you want to define your own lattice graph, or to use the concreate visit iterator structs for traits invisit. - square
- Square 2d Lattice Graph. It does not use
lattice_abstractfor historical and performance reason.
Type Aliases§
- Array2
- two-dimensional array
- Array
View2 - two-dimensional array view
- Array
View Mut2 - two-dimensional read-write array view