COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/deba/main.cpp @ 605:b3c57602c516

Last change on this file since 605:b3c57602c516 was 595:e10b5e9419ef, checked in by Balazs Dezso, 21 years ago
File size: 467 bytes
Line 
1#include <iostream>
2#include <cstdlib>
3#include "test_graph.h"
4
5using namespace std;
6using namespace hugo;
7
8
9int main() {
10        ListGraph g;
11        for (int i = 0; i < 3; ++i) {
12                ListGraph::Node node = g.addNode();
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        }
22        return 0;
23}
24
Note: See TracBrowser for help on using the repository browser.