disk-based-bfs 0.1.0

Fast generic implementation of breadth-first search using disk storage, suitable for extremely large implicit graphs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Defines the `BfsExpander` trait.

/// A value that represents no node.
pub const NONE: u64 = u64::MAX;

/// Defines the graph that the BFS will traverse.
pub trait BfsExpander<const EXPANSION_NODES: usize> {
    /// Given a node `node` of the graph, populates `expanded_nodes` with the adjacent nodes in the
    /// graph.
    fn expand(&mut self, node: u64, expanded_nodes: &mut [u64; EXPANSION_NODES]);
}