Expand description
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));Re-exports§
pub use use_adjacency;pub use use_edge;pub use use_graph_metrics;pub use use_graph_path;pub use use_graph_traversal;pub use use_node;pub use use_weighted_graph;
Structs§
Enums§
Functions§
- average_
degree - breadth_
first_ order - build_
directed_ adjacency - build_
undirected_ adjacency - build_
weighted_ directed_ adjacency - build_
weighted_ undirected_ adjacency - connected_
component - contains_
node - dedupe_
edges - degree
- degrees
- density_
directed - density_
undirected - depth_
first_ order - edge_
count_ directed - edge_
count_ undirected - has_
edge - has_
self_ loop - is_
valid_ path - max_
degree - max_
weight_ edge - min_
degree - min_
weight_ edge - neighbors
- node_
count - node_
ids - path_
weight - reachable
- shortest_
path_ unweighted - unique_
nodes