src/work/deba/main.cpp
changeset 597 a6e2b02f496a
parent 571 9632ea8be6ca
child 627 6cc21a9c9fda
equal deleted inserted replaced
1:5298948501d1 2:f882e8cce1a0
     1 #include <iostream>
     1 #include <iostream>
       
     2 #include <cstdlib>
     2 #include "test_graph.h"
     3 #include "test_graph.h"
     3 
     4 
     4 using namespace std;
     5 using namespace std;
     5 using namespace hugo;
     6 using namespace hugo;
     6 
     7 
     7 
     8 
     8 int main() {
     9 int main() {
     9 	ListGraph g;
    10 	ListGraph g;
    10 	ListGraph::NodeMapFactory::VectorMap<int> map(g, g.node_maps);
    11 	for (int i = 0; i < 3; ++i) {
    11 	ListGraph::Node node = g.addNode();
    12 		ListGraph::Node node = g.addNode();
    12 	map[node] = 12;	
    13 	}
       
    14 	ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps);
       
    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 	}
    13 	return 0;
    22 	return 0;
    14 }
    23 }
    15 
    24