#include #include #include #include // Visitor struct print_visitor : origin::dft_base_visitor { template void discover_vertex(Traversal const&, T const& t) { std::cout << "Disovered vertex: " << *t << '\n'; } }; // shorthand for converting to vertex_t origin::graph_::vertex_t v_(unsigned int n) { return origin::graph_::vertex_t(n); } int main() { // FIXME I get a ton of ambiguity errors typedef origin::undirected_adjacency_matrix graph_type; // Make a graph graph_type g(11); for(unsigned int i = 0u; i < g.order(); ++i) g[origin::graph_::vertex_t(i)] = i; g.add_edge(v_(0),v_(5)); g.add_edge(v_(0),v_(3)); g.add_edge(v_(1),v_(3)); g.add_edge(v_(1),v_(4)); g.add_edge(v_(2),v_(4)); g.add_edge(v_(2),v_(8)); g.add_edge(v_(4),v_(6)); g.add_edge(v_(4),v_(7)); g.add_edge(v_(5),v_(6)); g.add_edge(v_(6),v_(9)); g.add_edge(v_(7),v_(9)); g.add_edge(v_(7),v_(10)); g.add_edge(v_(8),v_(7)); // Make and run the DFT //origin::simple_depth_first_traversal simple_DFT(g, 0); //while(simple_DFT.next()) { } return 0; }