Implements breadth-first search (BFS) 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::breadth_first_search (const G &graph, typename G::id_type root, typename G::id_type target) |
| Performs a breadth-first search (BFS) to find a path from root to target node in a graph. | |
| template<Internal::valid_graph_type G> | |
| G | GraphLib::breadth_first_search (const G &graph, typename G::id_type root) |
| Performs a breadth-first search (BFS) to construct a spanning tree rooted at the given node. | |
Implements breadth-first search (BFS) algorithms for graph traversal and pathfinding.
This header provides two BFS-related function templates:
The functions support generic graph types satisfying the GraphLib concepts.
Definition in file bfs.h.