COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/deba/main.cpp @ 698:625de6f1e766

Last change on this file since 698:625de6f1e766 was 698:625de6f1e766, checked in by Balazs Dezso, 20 years ago
File size: 460 bytes
RevLine 
[378]1#include <iostream>
[595]2#include <cstdlib>
[698]3#include "list_graph.h"
[378]4
5using namespace std;
6using namespace hugo;
7
8
9int main() {
[627]10  ListGraph g;
11  for (int i = 0; i < 10; ++i) {
12    ListGraph::Node node = g.addNode();
13  }
[674]14  ListGraph::NodeMap<int> map(g);
[627]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;
[378]23}
24
Note: See TracBrowser for help on using the repository browser.