COIN-OR::LEMON - Graph Library

Changeset 595:e10b5e9419ef in lemon-0.x for src/work/deba/main.cpp


Ignore:
Timestamp:
05/10/04 15:49:35 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@775
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/deba/main.cpp

    r571 r595  
    11#include <iostream>
     2#include <cstdlib>
    23#include "test_graph.h"
    34
     
    89int main() {
    910        ListGraph g;
    10         ListGraph::NodeMapFactory::VectorMap<int> map(g, g.node_maps);
    11         ListGraph::Node node = g.addNode();
    12         map[node] = 12;
     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        }
    1322        return 0;
    1423}
Note: See TracChangeset for help on using the changeset viewer.