src/work/deba/main.cpp
changeset 640 d426dca0aaf7
parent 595 e10b5e9419ef
child 674 7733d18de0e8
equal deleted inserted replaced
2:f882e8cce1a0 3:a971e8b7941a
     5 using namespace std;
     5 using namespace std;
     6 using namespace hugo;
     6 using namespace hugo;
     7 
     7 
     8 
     8 
     9 int main() {
     9 int main() {
    10 	ListGraph g;
    10   ListGraph g;
    11 	for (int i = 0; i < 3; ++i) {
    11   for (int i = 0; i < 10; ++i) {
    12 		ListGraph::Node node = g.addNode();
    12     ListGraph::Node node = g.addNode();
    13 	}
    13   }
    14 	ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps);
    14   ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps);
    15 	for (int i = 0; i < 10; ++i) {
    15   for (int i = 0; i < 10; ++i) {
    16 		ListGraph::Node node = g.addNode();
    16     ListGraph::Node node = g.addNode();
    17 		map[node] = rand()%100;
    17     map[node] = rand()%100;
    18 	}
    18   }
    19 	for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    19   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    20 		cout << map[it] << endl;
    20     cout << map[it] << endl;
    21 	}
    21   }
    22 	return 0;
    22   return 0;
    23 }
    23 }
    24 
    24