src/work/deba/main.cpp
author alpar
Tue, 11 May 2004 19:38:00 +0000
changeset 614 75cf1d52eee5
parent 571 9632ea8be6ca
child 627 6cc21a9c9fda
permissions -rw-r--r--
Minor changes: Section labels fixed.
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@378
    10
	ListGraph g;
deba@595
    11
	for (int i = 0; i < 3; ++i) {
deba@595
    12
		ListGraph::Node node = g.addNode();
deba@595
    13
	}
deba@595
    14
	ListGraph::NodeMapFactory::Map<int> map(g, g.node_maps);
deba@595
    15
	for (int i = 0; i < 10; ++i) {
deba@595
    16
		ListGraph::Node node = g.addNode();
deba@595
    17
		map[node] = rand()%100;
deba@595
    18
	}
deba@595
    19
	for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
deba@595
    20
		cout << map[it] << endl;
deba@595
    21
	}
deba@378
    22
	return 0;
deba@378
    23
}
deba@378
    24