Packages / rupm

rs-collections-graph 0.1.0

Graphs with BFS, DFS, Dijkstra, topological sort and cycle detection

Install

cargo add rs-collections-graph --registry rupm

In Ruststudio: Packages, search for rs-collections-graph, Install.

Owner: Rust Studio. Licence: MIT OR Apache-2.0. Total downloads: 0. Published 2026-11-23.

Versions

README

# rs-collections-graph

Graphs with BFS, DFS, Dijkstra, topological sort and cycle detection

Add it with `rupm add rs-collections-graph` (or `cargo add rs-collections-graph --registry rupm`).

```rust
let mut g = rs_collections_graph::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));
```