Expand description
§pathfinding-indexed
Index-only pathfinding, flow, and graph algorithms with dense usize indices.
The primary API is IndexedGraph for directed graphs and
IndexedUndirectedGraph for undirected graphs. Algorithms are exposed as
methods on these types.
This crate builds on the original pathfinding
crate and credits Samuel Tardieu and its contributors for the original
library this indexed-only variant descends from.
§Example
use pathfinding_indexed::IndexedGraph;
let graph = IndexedGraph::from_adjacency(vec![
vec![(1, 2), (2, 4)],
vec![(2, 1), (3, 7)],
vec![(3, 3)],
vec![],
]);
let result = graph.dijkstra(0, |node| node == 3);
assert_eq!(result, Some((vec![0, 1, 2, 3], 6)));The minimum supported Rust version (MSRV) is Rust 1.87.0.
Re-exports§
pub use indexed_graph::IndexedGraph;pub use indexed_graph::IndexedGraphMap;pub use indexed_graph::IndexedUndirectedGraph;
Modules§
- indexed_
graph - Indexed graph storage and algorithms.
- prelude
- Convenience re-exports for indexed graph types.