Expand description
Primitive adjacency list helpers.
The crate provides small builders for directed and undirected adjacency lists plus basic neighbor and degree queries.
§Examples
use use_adjacency::{build_directed_adjacency, degree, has_edge, neighbors};
let adjacency = build_directed_adjacency(3, &[(0, 1), (0, 2)]).unwrap();
assert_eq!(neighbors(&adjacency, 0), Some(&[1, 2][..]));
assert_eq!(degree(&adjacency, 0), Some(2));
assert!(has_edge(&adjacency, 0, 2));