Traversal¶
Depth First Search¶
Basic algorithms for depth-first searching the nodes of a graph.
dfs_edges (G[, source, depth_limit]) |
Iterate over edges in a depth-first-search (DFS). |
dfs_tree (G[, source, depth_limit]) |
Return oriented tree constructed from a depth-first-search from source. |
dfs_predecessors (G[, source, depth_limit]) |
Return dictionary of predecessors in depth-first-search from source. |
dfs_successors (G[, source, depth_limit]) |
Return dictionary of successors in depth-first-search from source. |
dfs_preorder_nodes (G[, source, depth_limit]) |
Generate nodes in a depth-first-search pre-ordering starting at source. |
dfs_postorder_nodes (G[, source, depth_limit]) |
Generate nodes in a depth-first-search post-ordering starting at source. |
dfs_labeled_edges (G[, source, depth_limit]) |
Iterate over edges in a depth-first-search (DFS) labeled by type. |
Breadth First Search¶
Basic algorithms for breadth-first searching the nodes of a graph.
bfs_edges (G, source[, reverse]) |
Iterate over edges in a breadth-first-search starting at source. |
bfs_tree (G, source[, reverse]) |
Return an oriented tree constructed from of a breadth-first-search starting at source. |
bfs_predecessors (G, source) |
Returns an iterator of predecessors in breadth-first-search from source. |
bfs_successors (G, source) |
Returns an iterator of successors in breadth-first-search from source. |
Beam search¶
Basic algorithms for breadth-first searching the nodes of a graph.
bfs_beam_edges (G, source, value[, width]) |
Iterates over edges in a beam search. |