34 #ifndef _CYMEALG_DFS_H_ 35 #define _CYMEALG_DFS_H_ 38 #include "chomp/system/config.h" 43 template <
class Graph,
class Table>
45 int_t vertex, int_t &counter)
52 template <
class Graph,
class Table>
54 int_t vertex, int_t &counter)
62 template <
class Graph,
class Table>
71 template <
class Graph,
class Table1,
class Table2>
73 int_t vertex, int_t treeNumber, int_t countTrees,
74 Table2 &compVertices, int_t &curVertex,
75 Graph *sccGraph, int_t *sccEdgeAdded)
78 treeNumber, countTrees, compVertices,
79 curVertex, sccGraph, sccEdgeAdded);
83 template <
class Graph,
class Table1,
class Table2>
85 int_t vertex, int_t treeNumber, int_t countTrees,
86 Table2 &compVertices, int_t &curVertex,
87 Graph *sccGraph, int_t *sccEdgeAdded)
90 treeNumber, countTrees, compVertices,
91 curVertex, sccGraph, sccEdgeAdded);
103 template <
class Graph,
class Table1,
class Table2,
class Table3>
104 inline int_t
DFSforest (
const Graph &g,
const Table1 &ordered,
105 Table2 &compVertices, Table3 &compEnds,
bool nontrivial =
false,
108 return g.
DFSforest (ordered, compVertices, compEnds, nontrivial,
113 template <
class Graph,
class Table,
class Color>
115 const Color &color, int_t vertex = 0)
122 template <
class Graph,
class Table,
class Color>
133 template <
class Graph,
class Table,
class Color>
134 inline void DFScolor (
const Graph &g, Table &tab,
const Color &color,
144 #endif // _CYMEALG_DFS_H_
void DFScolorStack(const Graph &g, Table &tab, const Color &color, int_t vertex=0)
A stack version of the recurrent procedure for DFScolor.
void DFScolor(const Graph &g, Table &tab, const Color &color, int_t vertex=0)
Marks each vertex visited by DFS with the given color, starting with the given vertex.
void DFSfinishTime(const Graph &g, Table &tab)
Computes the DFS finishing time for each vertex.
void DFSfinishTimeStack(const Graph &g, Table &tab, int_t vertex, int_t &counter)
A stack version of the recurrent procedure for DFSfinishTime.
void DFSfinishTimeRecurrent(const Graph &g, Table &tab, int_t vertex, int_t &counter)
The recurrent procedure for DFSfinishTime.
bool DFSforestStack(const Graph &g, Table1 &tab, Table1 &ntab, int_t vertex, int_t treeNumber, int_t countTrees, Table2 &compVertices, int_t &curVertex, Graph *sccGraph, int_t *sccEdgeAdded)
A stack version of the recurrent procedure for DFSforest.
int_t DFSforest(const Graph &g, const Table1 &ordered, Table2 &compVertices, Table3 &compEnds, bool nontrivial=false, Graph *sccGraph=0)
Computes the DFS forest.
bool DFSforestRecurrent(const Graph &g, Table1 &tab, Table1 &ntab, int_t vertex, int_t treeNumber, int_t countTrees, Table2 &compVertices, int_t &curVertex, Graph *sccGraph, int_t *sccEdgeAdded)
The recurrent procedure for DFSforest.
void DFScolorRecurrent(const Graph &g, Table &tab, const Color &color, int_t vertex=0)
The recurrent procedure for DFScolor.