Skip to main content

bfs

Function bfs 

Source
pub fn bfs(
    graph: &KnowledgeGraph,
    start: &[String],
    depth: usize,
) -> (Vec<String>, Vec<(String, String)>)
Expand description

BFS traversal from start nodes up to a maximum depth.

Returns (visited_nodes, edges_traversed) where edges are (source, target) pairs.