author | athos |
Tue, 01 Jun 2004 11:00:24 +0000 | |
changeset 671 | 708df4dc6ab6 |
parent 595 | e10b5e9419ef |
child 674 | 7733d18de0e8 |
permissions | -rw-r--r-- |
deba@378 | 1 |
#include <iostream> |
deba@595 | 2 |
#include <cstdlib> |
deba@378 | 3 |
#include "test_graph.h" |
deba@378 | 4 |
|
deba@378 | 5 |
using namespace std; |
deba@378 | 6 |
using namespace hugo; |
deba@378 | 7 |
|
deba@378 | 8 |
|
deba@378 | 9 |
int main() { |
deba@627 | 10 |
ListGraph g; |
deba@627 | 11 |
for (int i = 0; i < 10; ++i) { |
deba@627 | 12 |
ListGraph::Node node = g.addNode(); |
deba@627 | 13 |
} |
deba@627 | 14 |
ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps); |
deba@627 | 15 |
for (int i = 0; i < 10; ++i) { |
deba@627 | 16 |
ListGraph::Node node = g.addNode(); |
deba@627 | 17 |
map[node] = rand()%100; |
deba@627 | 18 |
} |
deba@627 | 19 |
for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) { |
deba@627 | 20 |
cout << map[it] << endl; |
deba@627 | 21 |
} |
deba@627 | 22 |
return 0; |
deba@378 | 23 |
} |
deba@378 | 24 |