This auxiliary class is created to implement the function-type interface of Bfs algorithm. It does not have own run() method, it uses the functions and features of the plain Bfs.
This class should only be used through the bfs() function, which makes it easier to use the algorithm.
#include <lemon/bfs.h>
Inherits TR.
Public Member Functions | |
BfsWizard () | |
Constructor. | |
BfsWizard (const Digraph &g) | |
Constructor that requires parameters. | |
BfsWizard (const TR &b) | |
Copy constructor. | |
void | run (Node s) |
Runs BFS algorithm from the given source node. | |
bool | run (Node s, Node t) |
Finds the shortest path between s and t . | |
void | run () |
Runs BFS algorithm to visit all nodes in the digraph. | |
template<class T > | |
BfsWizard< SetPredMapBase< T > > | predMap (const T &t) |
template<class T > | |
BfsWizard< SetReachedMapBase< T > > | reachedMap (const T &t) |
template<class T > | |
BfsWizard< SetDistMapBase< T > > | distMap (const T &t) |
template<class T > | |
BfsWizard< SetProcessedMapBase < T > > | processedMap (const T &t) |
template<class T > | |
BfsWizard< SetPathBase< T > > | path (const T &t) |
BfsWizard | dist (const int &d) |
Private Types | |
typedef TR::Digraph | Digraph |
The type of the digraph the algorithm runs on. | |
typedef TR::PredMap | PredMap |
The type of the map that stores the predecessor arcs of the shortest paths. | |
typedef TR::DistMap | DistMap |
The type of the map that stores the distances of the nodes. | |
typedef TR::ReachedMap | ReachedMap |
The type of the map that indicates which nodes are reached. | |
typedef TR::ProcessedMap | ProcessedMap |
The type of the map that indicates which nodes are processed. | |
typedef TR::Path | Path |
The type of the shortest paths. | |
Constructor that requires parameters. These parameters will be the default values for the traits class.
g | The digraph the algorithm runs on. |
|
inline |
This method runs BFS algorithm from node s
in order to compute the shortest path to each node.
|
inline |
This method runs BFS algorithm from node s
in order to compute the shortest path to node t
(it stops searching when t
is processed).
true
if t
is reachable form s
.
|
inline |
This method runs BFS algorithm in order to compute the shortest path to each node.
|
inline |
Named parameter for setting PredMap object.
|
inline |
Named parameter for setting ReachedMap object.
|
inline |
Named parameter for setting DistMap object.
|
inline |
Named parameter for setting ProcessedMap object.
|
inline |
Named parameter for getting the shortest path to the target node.
|
inline |
Named parameter for getting the distance of the target node.