use-graph 0.0.1

Composable facade crate for RustUse graph primitives
Documentation

Thin facade for the use-graph workspace.

The crate reexports the focused graph crates directly so consumers can opt into one dependency while still using the smaller APIs.

Examples

use use_graph::*;

let adjacency = build_directed_adjacency(4, &[(0, 1), (1, 2), (0, 3)]).unwrap();
let path = shortest_path_unweighted(&adjacency, 0, 2).unwrap().unwrap();
let edge = WeightedEdge::new(0, 1, 1.5).unwrap();

assert_eq!(path.nodes(), &[0, 1, 2]);
assert_eq!(path_weight(&[edge]).unwrap(), 1.5);
assert_eq!(max_degree(&adjacency), Some(2));