use-adjacency 0.0.1

Primitive adjacency list builders and lookup helpers
Documentation
  • Coverage
  • 11.11%
    1 out of 9 items documented1 out of 7 items with examples
  • Size
  • Source code size: 5.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 662.07 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 33s Average build duration of successful builds.
  • all releases: 33s 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 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));