src/work/deba/main.cpp
author klao
Fri, 18 Jun 2004 12:43:20 +0000
changeset 687 6094295ea312
parent 627 6cc21a9c9fda
child 698 625de6f1e766
permissions -rw-r--r--
Legal files. Proposal.
     1 #include <iostream>
     2 #include <cstdlib>
     3 #include "test_graph.h"
     4 
     5 using namespace std;
     6 using namespace hugo;
     7 
     8 
     9 int main() {
    10   ListGraph g;
    11   for (int i = 0; i < 10; ++i) {
    12     ListGraph::Node node = g.addNode();
    13   }
    14   ListGraph::NodeMap<int> map(g);
    15   for (int i = 0; i < 10; ++i) {
    16     ListGraph::Node node = g.addNode();
    17     map[node] = rand()%100;
    18   }
    19   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    20     cout << map[it] << endl;
    21   }
    22   return 0;
    23 }
    24