src/work/deba/main.cpp
changeset 839 3edf35893a90
parent 702 4207f82a1778
child 922 e816fac59f6d
equal deleted inserted replaced
7:077c11af24cf 8:19c02aaf4146
       
     1 // -*- c++ -*-
     1 #include <iostream>
     2 #include <iostream>
     2 #include <cstdlib>
     3 #include <cstdlib>
     3 #include "list_graph.h"
     4 #include "list_graph.h"
     4 
     5 
     5 using namespace std;
     6 using namespace std;
     6 using namespace hugo;
     7 using namespace hugo;
       
     8 
     7 
     9 
     8 
    10 
     9 int main() {
    11 int main() {
    10   ListGraph g;
    12   ListGraph g;
    11   for (int i = 0; i < 10; ++i) {
    13   for (int i = 0; i < 10; ++i) {
    20     cout << map[it] << endl;
    22     cout << map[it] << endl;
    21   }
    23   }
    22   ListGraph::NodeMap<int>::iterator pit;
    24   ListGraph::NodeMap<int>::iterator pit;
    23   for (pit = map.begin(); pit != map.end(); ++pit) {
    25   for (pit = map.begin(); pit != map.end(); ++pit) {
    24     cout << g.id(pit->first) << ' ' << pit->second << endl;
    26     cout << g.id(pit->first) << ' ' << pit->second << endl;
    25   }
    27     (*pit).second = g.id(pit->first);
    26   /*
    28     cout << g.id((*pit).first) << ' ' << (*pit).second << endl;
    27   ListGraph::NodeMap<double> ot_map = map;
    29   }  
    28   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    30   const ListGraph::NodeMap<int> const_map = map;
    29     ot_map[it] *= 2.1;
    31   ListGraph::NodeMap<int>::const_iterator cit;
    30     cout << ot_map[it] << endl;
    32   for (cit = const_map.begin(); cit != const_map.end(); ++cit) {
    31   }
    33     cerr << g.id(cit->first) << ' ' << cit->second << endl;
    32   ot_map = map;
    34     cerr << g.id((*cit).first) << ' ' << (*cit).second << endl;
    33   for (ListGraph::NodeIt it(g); g.valid(it); g.next(it)) {
    35   }  
    34     ot_map[it] *= 3.1;
       
    35     cout << ot_map[it] << endl;
       
    36     }*/
       
    37   return 0;
    36   return 0;
    38 }
    37 }
    39 
    38