use-weighted-graph 0.0.1

Primitive weighted edge and weighted adjacency helpers
Documentation
  • Coverage
  • 6.25%
    1 out of 16 items documented1 out of 10 items with examples
  • Size
  • Source code size: 7.68 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 731.15 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-graph
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

Primitive weighted graph helpers.

The crate provides a small weighted-edge type plus adjacency builders and a few helpers for summarizing edge weights.

Examples

use use_weighted_graph::{WeightedEdge, build_weighted_directed_adjacency, path_weight};

let edge = WeightedEdge::new(0, 1, 2.5).unwrap();
let adjacency = build_weighted_directed_adjacency(2, &[edge]).unwrap();

assert_eq!(adjacency, vec![vec![(1, 2.5)], vec![]]);
assert_eq!(path_weight(&[edge]), Some(2.5));