Skip to main content

bfs_layers

Function bfs_layers 

Source
pub fn bfs_layers(store: &LpgStore, start: NodeId) -> Vec<Vec<NodeId>>
Expand description

BFS layers - returns nodes grouped by their distance from the start.

§Arguments

  • store - The graph store to traverse
  • start - The starting node ID

§Returns

A vector of vectors, where result[i] contains all nodes at distance i from start.