|
Public Types |
typedef GR | Graph |
| The type of the underlying graph.
|
typedef Graph::Node | Node |
|
|
typedef Graph::NodeIt | NodeIt |
|
|
typedef Graph::Edge | Edge |
|
|
typedef Graph::OutEdgeIt | OutEdgeIt |
|
|
typedef Graph::template NodeMap<
Edge > | PredMap |
| The type of the map that stores the last edges of the paths on the DFS tree.
|
typedef Graph::template NodeMap<
Node > | PredNodeMap |
| The type of the map that stores the last but one nodes of the paths on the DFS tree.
|
typedef Graph::template NodeMap<
int > | DistMap |
| The type of the map that stores the dists of the nodes on the DFS tree.
|
Public Member Functions |
| Dfs (const Graph &_G) |
| Constructor.
|
| ~Dfs () |
| Destructor.
|
Dfs & | setPredMap (PredMap &m) |
| Sets the map storing the predecessor edges.
|
Dfs & | setPredNodeMap (PredNodeMap &m) |
| Sets the map storing the predecessor nodes.
|
Dfs & | setDistMap (DistMap &m) |
| Sets the map storing the distances calculated by the algorithm.
|
void | run (Node s) |
| Runs DFS algorithm from node s .
|
int | dist (Node v) const |
| The distance of a node from the root on the DFS tree.
|
Edge | pred (Node v) const |
| Returns the 'previous edge' of the DFS path tree.
|
Node | predNode (Node v) const |
| Returns the 'previous node' of the DFS tree.
|
const DistMap & | distMap () const |
| Returns a reference to the NodeMap of distances on the DFS tree.
|
const PredMap & | predMap () const |
| Returns a reference to the DFS tree map.
|
const PredNodeMap & | predNodeMap () const |
| Returns a reference to the map of last but one nodes of the DFS tree.
|
bool | reached (Node v) |
| Checks if a node is reachable from the root.
|