diff -r ee5959aa4410 -r c280de819a73 src/work/marci/top_sort_test.cc --- a/src/work/marci/top_sort_test.cc Sun Apr 17 18:57:22 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -// -*- c++ -*- -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -using namespace lemon; - -using std::cout; -using std::endl; - -int main() { - typedef SageGraph Graph; - Graph g; - readDimacs(std::cin, g); - - { - std::list l; - //NullMap pred; - Graph::NodeMap pred(g, INVALID); - topSort(g, l, pred); - cout << "Leaving order of dfs which is pretopological..." << endl; - for(std::list::const_iterator i=l.begin(); i!=l.end(); ++i) { - cout << *i << " "; - } - cout << endl; - - FOR_EACH_LOC(Graph::NodeIt, n, g) { - cout << "pred of node " << n << " is " << pred[n] << endl; - } - } - - { - typedef RevGraphWrapper GW; - GW gw(g); - std::list l; - //NullMap pred; - GW::NodeMap pred(gw, INVALID); - topSort(gw, l, pred); - cout << "Same in the reversed oriented graph..." << endl; - for(std::list::const_iterator i=l.begin(); i!=l.end(); ++i) { - cout << *i << " "; - } - cout << endl; - - FOR_EACH_LOC(GW::NodeIt, n, gw) { - cout << "pred of node " << n << " is " << pred[n] << endl; - } - } - - return 0; -}