Changeset 595:e10b5e9419ef in lemon-0.x for src/work/deba/main.cpp
- Timestamp:
- 05/10/04 15:49:35 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@775
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/deba/main.cpp
r571 r595 1 1 #include <iostream> 2 #include <cstdlib> 2 3 #include "test_graph.h" 3 4 … … 8 9 int main() { 9 10 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 } 13 22 return 0; 14 23 }
Note: See TracChangeset
for help on using the changeset viewer.