src/work/marci/top_sort_test.cc
author marci
Thu, 06 May 2004 15:10:48 +0000
changeset 549 5531429143bc
child 552 83c22ca968d8
permissions -rw-r--r--
(none)
     1 // -*- c++ -*-
     2 #include <iostream>
     3 #include <fstream>
     4 #include <list>
     5 
     6 #include <hugo/dimacs.h>
     7 #include <bfs_dfs_misc.h>
     8 #include <list_graph.h>
     9 
    10 using namespace hugo;
    11 
    12 int main() {
    13   typedef ListGraph Graph;
    14   Graph g;
    15   readDimacs(std::cin, g);
    16   std::list<Graph::Node> l;
    17   topSort(g, l);
    18   std::cout << "Leaving order of dfs which is pretopological..." << std::endl;
    19   for(std::list<Graph::Node>::const_iterator i=l.begin(); i!=l.end(); ++i) {
    20     std::cout << *i << " ";
    21   }
    22   std::cout << std::endl;
    23 
    24   return 0;
    25 }