graph-tools 0.1.0
Graphs with BFS, DFS, Dijkstra, topological sort and cycle detection
Install
cargo add graph-tools --registry rupm
In Ruststudio: Packages, search for graph-tools, Install.
Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-22.
Versions
- 0.1.0 2026-11-22
README
# graph-tools Graphs with BFS, DFS, Dijkstra, topological sort and cycle detection Add it with `rupm add graph-tools` (or `cargo add graph-tools --registry rupm`). ```rust let mut g = graph_tools::Graph::new(3); g.add_edge(0, 1, 1)?; g.add_edge(1, 2, 2)?; let (dist, _) = g.dijkstra(0)?; assert_eq!(dist[2], Some(3)); ```