|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Depth-first search that computes finish times in postorder (Phase 1). More...
Classes | |
| struct | Frame |
| A node that waits for the one that it visits, and the next of its outgoing arcs to look at. More... | |
Functions | |
| template<class GT , class Enter , class Leave > | |
| void | search (const GT &g, typename GT::Node *p, Enter enter, Leave leave) |
Depth-first search that computes finish times in postorder (Phase 1).
Performs a DFS traversal starting from node p, marking visited nodes and arcs with the Depth_First bit. Nodes are appended to the df array in postorder (after all descendants have been visited).
This is the first phase of Kosaraju's algorithm.
| GT | Graph type. |
| [in] | g | The directed graph. |
| [in] | p | Starting node for the DFS. |
| [out] | df | Array where nodes are stored in postorder (finish time order). |
|
inline |
Definition at line 119 of file kosaraju.H.
References Aleph::Depth_First, Aleph::Dfs_Stack< T >::is_empty(), IS_NODE_VISITED, Aleph::kosaraju_detail::Frame< GT >::next_arc(), Aleph::kosaraju_detail::Frame< GT >::next_target(), NODE_BITS, Aleph::kosaraju_detail::Frame< GT >::p, Aleph::Dfs_Stack< T >::pop(), Aleph::Dfs_Stack< T >::push(), and Aleph::Dfs_Stack< T >::top().
Referenced by Aleph::__dfp_phase1(), Aleph::__dfp_phase2_list(), and Aleph::__dfp_phase2_subgraph().