Expand description
Graph traversal. Phase 0 ships BFS; ALGO-TR-002 adds DFS;
ALGO-TR-001 adds the multi-output BFS variant bfs_tree.
Structs§
- BfsSimple
- Result of
bfs_simple. - BfsTree
- Result of a multi-output BFS scan from a single root. Returned by
bfs_tree. - DfsSimple
- Result of
dfs_simple. - DfsTree
- Result of a multi-output DFS scan from a single root. Returned by
dfs_tree. - Neighbor
Sample Result - Result of k-hop neighborhood sampling.
Enums§
- BfsMode
- Direction mode for
bfs_simple. - DfsMode
- Direction mode for
dfs_simple.
Functions§
- bfs
- Visit order of vertices reachable from
root, in BFS order. - bfs_
simple - Mode-aware BFS from a single root, returning visit order, layer boundaries, and BFS-tree parents.
- bfs_
tree - Multi-output BFS from
root. Returns visit order, per-vertex distances, and per-vertex BFS-tree parent in a single pass. - dfs
- Pre-order visit of vertices reachable from
root, in DFS order. - dfs_
simple - Mode-aware DFS from a single root, returning pre/post-order, parents, and DFS-tree depth.
- dfs_
tree - Multi-output DFS from
root. Returns visit order (pre and post), per-vertex parents, and DFS-tree depth in a single pass. - neighbor_
sample - Sample k-hop neighborhoods around seed vertices.
- neighbor_
sample_ weighted - Sample k-hop neighborhoods with importance-weighted sampling.