Implements depth-first search (DFS) algorithms for graph traversal and pathfinding. More...
Go to the source code of this file.
Functions | |
| template<Internal::valid_graph_type G> | |
| std::vector< typename G::id_type > | GraphLib::depth_first_search (const G &graph, typename G::id_type root, typename G::id_type target) |
| Performs a depth-first search (DFS) to find a path from root to target node in a graph. | |
| template<Internal::valid_graph_type G> | |
| G | GraphLib::depth_first_search (const G &graph, typename G::id_type root) |
| Performs a depth-first search (DFS) to construct a spanning tree rooted at the given node. | |
Implements depth-first search (DFS) algorithms for graph traversal and pathfinding.
This header provides two DFS-related function templates:
The functions support generic graph types satisfying the GraphLib concepts.
Definition in file dfs.h.