COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/marci/top_sort_test.cc @ 549:5531429143bc

Last change on this file since 549:5531429143bc was 549:5531429143bc, checked in by marci, 16 years ago
File size: 522 bytes
RevLine 
[549]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
10using namespace hugo;
11
12int 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}
Note: See TracBrowser for help on using the repository browser.