30 #ifndef __CLAW_GRAPH_ALGORITHM_HPP__ 31 #define __CLAW_GRAPH_ALGORITHM_HPP__ 46 typedef typename Graph::vertex_type vertex_type;
49 void init(
const Graph& g ) {}
50 void start_vertex(
const vertex_type& v ) {}
51 void visit_edge(
const vertex_type& v1,
const vertex_type& v2 ) {}
52 void end_vertex(
const vertex_type& v ) {}
71 template<
class Graph,
class Events = scan_events<Graph> >
75 typedef typename Graph::vertex_type vertex_type;
76 typedef typename Graph::vertex_iterator vertex_iterator ;
83 typedef std::map<vertex_type, int,
94 const vertex_type& m_source;
115 template<
class Graph,
class Events =
typename Graph::scan_events>
119 typedef typename Graph::vertex_type vertex_type;
120 typedef typename Graph::vertex_iterator vertex_iterator ;
127 typedef std::map<vertex_type, int,
136 void recursive_scan(
const vertex_type& s, coloration& seen_vertices);
159 template<
class Graph>
163 typedef typename scan_events<Graph>::vertex_type vertex_type;
164 typedef std::vector<vertex_type> result_type;
165 typedef typename result_type::const_iterator const_iterator;
169 void init(
const Graph& g );
170 void end_vertex(
const vertex_type& s );
172 void operator()(
const Graph& g );
173 const vertex_type& operator[](
unsigned int index)
const;
175 const_iterator begin()
const;
176 const_iterator end()
const;
180 result_type m_result;
187 #include <claw/impl/graph_algorithm.tpp> 189 #endif // __CLAW_GRAPH_ALGORITHM_HPP__ This class performs a depth scan of a graph. All nodes are proceeded.
std::map< vertex_type, int, typename Graph::vertex_compare > coloration
Colors are :
std::map< vertex_type, int, typename Graph::vertex_compare > coloration
Colors are :
This class performs a depth scan of a graph. Only reachables vertices from a given vertex are proceed...
Pass this class as the "Envents" template parameter of the depth scan class to sort the vertices of a...
This is the main namespace.
Different stages of graph scanning.