edgewise 0.1.0

A simple graph library with BFS, DFS, Dijkstra, and random graph generation.
Documentation
  • Coverage
  • 5.56%
    1 out of 18 items documented1 out of 10 items with examples
  • Size
  • Source code size: 33.93 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.71 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 26s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • alexfedotov/edgewise
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • alexfedotov

edgewise

edgewise is a lightweight and ergonomic Rust 🦀 library for working with graphs.

It provides:

  • A simple adjacency-list graph structure
  • Random graph generation ((un)weighted, (un)directed)
  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Dijkstra’s shortest-path algorithm

Example

use edgewise::{Graph, Weighted};

let g = Graph::new(vec![
    vec![(1, Weighted(4)), (2, Weighted(1))],
    vec![(3, Weighted(1))],
    vec![(1, Weighted(2))],
    vec![],
]);

let distances = g.dijkstra(0)?;
println!("{:?}", distances);

Installation

[dependencies]
edgewise = "0.1"

License

MIT or Apache-2.0