COIN-OR::LEMON - Graph Library

Changeset 703:32f280a5ed7d in lemon-0.x for src/work/deba/main.cpp


Ignore:
Timestamp:
07/15/04 14:15:58 (20 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@954
Message:
 
File:
1 edited

Legend:

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

    r702 r703  
     1// -*- c++ -*-
    12#include <iostream>
    23#include <cstdlib>
     
    56using namespace std;
    67using namespace hugo;
     8
    79
    810
     
    2325  for (pit = map.begin(); pit != map.end(); ++pit) {
    2426    cout << g.id(pit->first) << ' ' << pit->second << endl;
    25   }
    26   /*
    27   ListGraph::NodeMap<double> ot_map = map;
    28   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    29     ot_map[it] *= 2.1;
    30     cout << ot_map[it] << endl;
    31   }
    32   ot_map = map;
    33   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    34     ot_map[it] *= 3.1;
    35     cout << ot_map[it] << endl;
    36     }*/
     27    (*pit).second = g.id(pit->first);
     28    cout << g.id((*pit).first) << ' ' << (*pit).second << endl;
     29  } 
     30  const ListGraph::NodeMap<int> const_map = map;
     31  ListGraph::NodeMap<int>::const_iterator cit;
     32  for (cit = const_map.begin(); cit != const_map.end(); ++cit) {
     33    cerr << g.id(cit->first) << ' ' << cit->second << endl;
     34    cerr << g.id((*cit).first) << ' ' << (*cit).second << endl;
     35  } 
    3736  return 0;
    3837}
Note: See TracChangeset for help on using the changeset viewer.