Hard Warning checking
authordeba
Fri, 02 Mar 2007 18:04:28 +0000
changeset 238681b47fc5c444
parent 2385 096d83158d41
child 2387 317b9a88c350
Hard Warning checking
- based on the remark of the ZIB user
- we do not use -Winline
benchmark/bench_tools.h
benchmark/hcube.cc
benchmark/swap_bipartite_bench.cc
configure.ac
demo/descriptor_map_demo.cc
demo/simann_maxcut_demo.cc
lemon/bellman_ford.h
lemon/bfs.h
lemon/bipartite_matching.h
lemon/bits/alteration_notifier.h
lemon/bits/array_map.h
lemon/bits/base_extender.h
lemon/bits/debug_map.h
lemon/bits/edge_set_extender.h
lemon/bits/graph_adaptor_extender.h
lemon/bits/graph_extender.h
lemon/bits/item_reader.h
lemon/bits/item_writer.h
lemon/bits/lp_id.h
lemon/bits/utility.h
lemon/bits/variant.h
lemon/bits/vector_map.h
lemon/bpugraph_adaptor.h
lemon/bucket_heap.h
lemon/csp.h
lemon/dfs.h
lemon/dijkstra.h
lemon/edge_set.h
lemon/error.h
lemon/full_graph.h
lemon/graph_adaptor.h
lemon/graph_reader.h
lemon/graph_to_eps.h
lemon/graph_utils.h
lemon/graph_writer.h
lemon/grid_ugraph.h
lemon/hao_orlin.h
lemon/hypercube_graph.h
lemon/iterable_maps.h
lemon/johnson.h
lemon/kruskal.h
lemon/lemon_reader.h
lemon/lemon_writer.h
lemon/list_graph.h
lemon/lp_base.h
lemon/lp_glpk.cc
lemon/lp_soplex.cc
lemon/matrix_maps.h
lemon/max_matching.h
lemon/nagamochi_ibaraki.h
lemon/path.h
lemon/polynomial.h
lemon/preflow.h
lemon/radix_heap.h
lemon/radix_sort.h
lemon/random.h
lemon/smart_graph.h
lemon/steiner.h
lemon/ugraph_adaptor.h
lemon/unionfind.h
test/all_pairs_shortest_path_test.cc
test/arborescence_test.cc
test/bipartite_matching_test.cc
test/lp_test.cc
test/map_test.h
test/max_matching_test.cc
test/mip_test.cc
test/radix_sort_test.cc
     1.1 --- a/benchmark/bench_tools.h	Fri Mar 02 17:56:22 2007 +0000
     1.2 +++ b/benchmark/bench_tools.h	Fri Mar 02 18:04:28 2007 +0000
     1.3 @@ -80,7 +80,7 @@
     1.4      }
     1.5  };
     1.6  
     1.7 -inline void PrintTime(char *ID,lemon::Timer &T) 
     1.8 +inline void PrintTime(const char *ID, lemon::Timer &T) 
     1.9  {
    1.10    lemon::TimeStamp S(T);
    1.11    std::cout << ID << ' ' << S.userTime() << ' '
     2.1 --- a/benchmark/hcube.cc	Fri Mar 02 17:56:22 2007 +0000
     2.2 +++ b/benchmark/hcube.cc	Fri Mar 02 18:04:28 2007 +0000
     2.3 @@ -78,7 +78,7 @@
     2.4    Graph::EdgeMap<int> map(G);
     2.5    for(int i=0;i<5;i++) {
     2.6      Primes P;
     2.7 -    for(int i=0;i<dim*(1<<dim);i++) P();
     2.8 +    for(int j=0;j<dim*(1<<dim);j++) P();
     2.9      
    2.10      //  for(EdgeIt e(G);G.valid(e);G.next(e)) map[e]=P();
    2.11  
     3.1 --- a/benchmark/swap_bipartite_bench.cc	Fri Mar 02 17:56:22 2007 +0000
     3.2 +++ b/benchmark/swap_bipartite_bench.cc	Fri Mar 02 18:04:28 2007 +0000
     3.3 @@ -42,19 +42,19 @@
     3.4        vector<LGraph::Node> laNodes;
     3.5        vector<LGraph::Node> lbNodes;  
     3.6        
     3.7 -      for (int i = 0; i < n; ++i) {
     3.8 +      for (int j = 0; j < n; ++j) {
     3.9          Node node = graph.addANode();
    3.10          aNodes.push_back(node);
    3.11          LGraph::Node lnode = lgraph.addANode();
    3.12          laNodes.push_back(lnode);
    3.13        }
    3.14 -      for (int i = 0; i < m; ++i) {
    3.15 +      for (int j = 0; j < m; ++j) {
    3.16          Node node = graph.addBNode();
    3.17          bNodes.push_back(node);
    3.18          LGraph::Node lnode = lgraph.addBNode();
    3.19          lbNodes.push_back(lnode);
    3.20        }
    3.21 -      for (int i = 0; i < e; ++i) {
    3.22 +      for (int j = 0; j < e; ++j) {
    3.23          int a,b;
    3.24  	Node aNode = aNodes[a=rnd[n]];
    3.25          Node bNode = bNodes[b=rnd[m]];
     4.1 --- a/configure.ac	Fri Mar 02 17:56:22 2007 +0000
     4.2 +++ b/configure.ac	Fri Mar 02 18:04:28 2007 +0000
     4.3 @@ -17,7 +17,7 @@
     4.4  AC_PROG_LIBTOOL
     4.5  
     4.6  if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
     4.7 -  CXXFLAGS="$CXXFLAGS -Wall -W"
     4.8 +  CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -Wshadow -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
     4.9  fi
    4.10  
    4.11  AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
     5.1 --- a/demo/descriptor_map_demo.cc	Fri Mar 02 17:56:22 2007 +0000
     5.2 +++ b/demo/descriptor_map_demo.cc	Fri Mar 02 18:04:28 2007 +0000
     5.3 @@ -62,7 +62,7 @@
     5.4  
     5.5    Value operator[](const Key& key) const {
     5.6      double angle = descriptor[key] * 2 * M_PI 
     5.7 -      / (double)descriptor.inverse().size();
     5.8 +      / double(descriptor.inverse().size());
     5.9      double x = std::cos(angle) * radius + center.x;
    5.10      double y = std::sin(angle) * radius + center.y;
    5.11      return Value(x, y);
    5.12 @@ -103,7 +103,7 @@
    5.13    //
    5.14    // The inversemap cannot works without its DescriptorMap because
    5.15    // it holds reference to it. 
    5.16 -  const int EDGE = (int)(NODE * std::log(double(NODE)));
    5.17 +  const int EDGE = int(NODE * std::log(double(NODE)));
    5.18    for (int i = 0; i < EDGE; ++i) {
    5.19      int si = rnd[NODE];
    5.20      int ti = rnd[NODE];
     6.1 --- a/demo/simann_maxcut_demo.cc	Fri Mar 02 17:56:22 2007 +0000
     6.2 +++ b/demo/simann_maxcut_demo.cc	Fri Mar 02 18:04:28 2007 +0000
     6.3 @@ -116,7 +116,7 @@
     6.4    simann.setEntity(e);
     6.5    simann.run();
     6.6    
     6.7 -  Entity* be = (Entity *) simann.getBestEntity();
     6.8 +  Entity* be = static_cast<Entity*>(simann.getBestEntity());
     6.9    std::cout << be->sum << std::endl;
    6.10    for (NodeIt n(g); n != INVALID; ++n)
    6.11      if (be->a[n]) std::cout << g.id(n) << ": 1" << std::endl;
     7.1 --- a/lemon/bellman_ford.h	Fri Mar 02 17:56:22 2007 +0000
     7.2 +++ b/lemon/bellman_ford.h	Fri Mar 02 18:04:28 2007 +0000
     7.3 @@ -436,15 +436,15 @@
     7.4      /// \return %True when the algorithm have not found more shorter
     7.5      /// paths.
     7.6      bool processNextRound() {
     7.7 -      for (int i = 0; i < (int)_process.size(); ++i) {
     7.8 +      for (int i = 0; i < int(_process.size()); ++i) {
     7.9  	_mask->set(_process[i], false);
    7.10        }
    7.11        std::vector<Node> nextProcess;
    7.12        std::vector<Value> values(_process.size());
    7.13 -      for (int i = 0; i < (int)_process.size(); ++i) {
    7.14 +      for (int i = 0; i < int(_process.size()); ++i) {
    7.15  	values[i] = (*_dist)[_process[i]];
    7.16        }
    7.17 -      for (int i = 0; i < (int)_process.size(); ++i) {
    7.18 +      for (int i = 0; i < int(_process.size()); ++i) {
    7.19  	for (OutEdgeIt it(*graph, _process[i]); it != INVALID; ++it) {
    7.20  	  Node target = graph->target(it);
    7.21  	  Value relaxed = OperationTraits::plus(values[i], (*length)[it]);
    7.22 @@ -472,11 +472,11 @@
    7.23      /// called just weak round.
    7.24      /// \return %True when the algorithm have not found more shorter paths.
    7.25      bool processNextWeakRound() {
    7.26 -      for (int i = 0; i < (int)_process.size(); ++i) {
    7.27 +      for (int i = 0; i < int(_process.size()); ++i) {
    7.28  	_mask->set(_process[i], false);
    7.29        }
    7.30        std::vector<Node> nextProcess;
    7.31 -      for (int i = 0; i < (int)_process.size(); ++i) {
    7.32 +      for (int i = 0; i < int(_process.size()); ++i) {
    7.33  	for (OutEdgeIt it(*graph, _process[i]); it != INVALID; ++it) {
    7.34  	  Node target = graph->target(it);
    7.35  	  Value relaxed = 
    7.36 @@ -645,13 +645,13 @@
    7.37        }
    7.38  
    7.39        bool operator==(const ActiveIt& it) const { 
    7.40 -        return (Node)(*this) == (Node)it; 
    7.41 +        return static_cast<Node>(*this) == static_cast<Node>(it); 
    7.42        }
    7.43        bool operator!=(const ActiveIt& it) const { 
    7.44 -        return (Node)(*this) != (Node)it; 
    7.45 +        return static_cast<Node>(*this) != static_cast<Node>(it); 
    7.46        }
    7.47        bool operator<(const ActiveIt& it) const { 
    7.48 -        return (Node)(*this) < (Node)it; 
    7.49 +        return static_cast<Node>(*this) < static_cast<Node>(it); 
    7.50        }
    7.51        
    7.52      private:
    7.53 @@ -865,8 +865,9 @@
    7.54      BellmanFordWizardBase(const _Graph& graph, 
    7.55  			  const _LengthMap& length, 
    7.56  			  Node source = INVALID) :
    7.57 -      _graph((void *)&graph), _length((void *)&length), _pred(0),
    7.58 -      _dist(0), _source(source) {}
    7.59 +      _graph(reinterpret_cast<void*>(const_cast<_Graph*>(&graph))), 
    7.60 +      _length(reinterpret_cast<void*>(const_cast<_LengthMap*>(&length))), 
    7.61 +      _pred(0), _dist(0), _source(source) {}
    7.62  
    7.63    };
    7.64    
    7.65 @@ -923,8 +924,8 @@
    7.66      /// Constructor that requires parameters.
    7.67      /// These parameters will be the default values for the traits class.
    7.68      BellmanFordWizard(const Graph& graph, const LengthMap& length, 
    7.69 -		      Node source = INVALID) 
    7.70 -      : _Traits(graph, length, source) {}
    7.71 +		      Node src = INVALID) 
    7.72 +      : _Traits(graph, length, src) {}
    7.73  
    7.74      /// \brief Copy constructor
    7.75      BellmanFordWizard(const _Traits &b) : _Traits(b) {}
    7.76 @@ -938,9 +939,10 @@
    7.77      void run() {
    7.78        if(Base::_source == INVALID) throw UninitializedParameter();
    7.79        BellmanFord<Graph,LengthMap,_Traits> 
    7.80 -	bf(*(Graph*)Base::_graph, *(LengthMap*)Base::_length);
    7.81 -      if (Base::_pred) bf.predMap(*(PredMap*)Base::_pred);
    7.82 -      if (Base::_dist) bf.distMap(*(DistMap*)Base::_dist);
    7.83 +	bf(*reinterpret_cast<const Graph*>(Base::_graph), 
    7.84 +           *reinterpret_cast<const LengthMap*>(Base::_length));
    7.85 +      if (Base::_pred) bf.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
    7.86 +      if (Base::_dist) bf.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
    7.87        bf.run(Base::_source);
    7.88      }
    7.89  
    7.90 @@ -948,8 +950,8 @@
    7.91      ///
    7.92      /// Runs BellmanFord algorithm from the given node.
    7.93      /// \param source is the given source.
    7.94 -    void run(Node source) {
    7.95 -      Base::_source = source;
    7.96 +    void run(Node src) {
    7.97 +      Base::_source = src;
    7.98        run();
    7.99      }
   7.100  
   7.101 @@ -969,7 +971,7 @@
   7.102      template<class T>
   7.103      BellmanFordWizard<DefPredMapBase<T> > predMap(const T &t) 
   7.104      {
   7.105 -      Base::_pred=(void *)&t;
   7.106 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   7.107        return BellmanFordWizard<DefPredMapBase<T> >(*this);
   7.108      }
   7.109      
   7.110 @@ -988,7 +990,7 @@
   7.111      ///
   7.112      template<class T>
   7.113      BellmanFordWizard<DefDistMapBase<T> > distMap(const T &t) {
   7.114 -      Base::_dist=(void *)&t;
   7.115 +      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   7.116        return BellmanFordWizard<DefDistMapBase<T> >(*this);
   7.117      }
   7.118  
   7.119 @@ -1013,8 +1015,8 @@
   7.120      ///
   7.121      /// Sets the source node, from which the BellmanFord algorithm runs.
   7.122      /// \param source is the source node.
   7.123 -    BellmanFordWizard<_Traits>& source(Node source) {
   7.124 -      Base::_source = source;
   7.125 +    BellmanFordWizard<_Traits>& source(Node src) {
   7.126 +      Base::_source = src;
   7.127        return *this;
   7.128      }
   7.129      
     8.1 --- a/lemon/bfs.h	Fri Mar 02 17:56:22 2007 +0000
     8.2 +++ b/lemon/bfs.h	Fri Mar 02 18:04:28 2007 +0000
     8.3 @@ -488,11 +488,11 @@
     8.4      ///parameter should be initially false.
     8.5      ///
     8.6      ///\param target The target node.
     8.7 -    ///\retval reached Indicates that the target node is reached.
     8.8 +    ///\retval reach Indicates that the target node is reached.
     8.9      ///\return The processed node.
    8.10      ///
    8.11      ///\warning The queue must not be empty!
    8.12 -    Node processNextNode(Node target, bool& reached)
    8.13 +    Node processNextNode(Node target, bool& reach)
    8.14      {
    8.15        if(_queue_tail==_queue_next_dist) {
    8.16  	_curr_dist++;
    8.17 @@ -507,7 +507,7 @@
    8.18  	  _reached->set(m,true);
    8.19  	  _pred->set(m,e);
    8.20  	  _dist->set(m,_curr_dist);
    8.21 -          reached = reached || (target == m);
    8.22 +          reach = reach || (target == m);
    8.23  	}
    8.24        return n;
    8.25      }
    8.26 @@ -521,12 +521,12 @@
    8.27      ///should be initially false.
    8.28      ///
    8.29      ///\param nm The nodemaps of possible targets.
    8.30 -    ///\retval reached Indicates that one of the target nodes is reached.
    8.31 +    ///\retval reach Indicates that one of the target nodes is reached.
    8.32      ///\return The processed node.
    8.33      ///
    8.34      ///\warning The queue must not be empty!
    8.35      template<class NM>
    8.36 -    Node processNextNode(const NM& nm, bool& reached)
    8.37 +    Node processNextNode(const NM& nm, bool& reach)
    8.38      {
    8.39        if(_queue_tail==_queue_next_dist) {
    8.40  	_curr_dist++;
    8.41 @@ -541,7 +541,7 @@
    8.42  	  _reached->set(m,true);
    8.43  	  _pred->set(m,e);
    8.44  	  _dist->set(m,_curr_dist);
    8.45 -          reached = reached || nm[m];
    8.46 +          reached = reach || nm[m];
    8.47  	}
    8.48        return n;
    8.49      }
    8.50 @@ -604,8 +604,8 @@
    8.51      ///
    8.52      void start(Node dest)
    8.53      {
    8.54 -      bool reached = false;
    8.55 -      while ( !emptyQueue() && !reached) processNextNode(dest, reached);
    8.56 +      bool reach = false;
    8.57 +      while ( !emptyQueue() && !reach) processNextNode(dest, reach);
    8.58      }
    8.59      
    8.60      ///Executes the algorithm until a condition is met.
    8.61 @@ -622,8 +622,8 @@
    8.62      template<class NM>
    8.63      void start(const NM &nm)
    8.64      {
    8.65 -      bool reached = false;
    8.66 -      while ( !emptyQueue() && !reached) processNextNode(nm, reached);
    8.67 +      bool reach = false;
    8.68 +      while ( !emptyQueue() && !reach) processNextNode(nm, reach);
    8.69      }
    8.70      
    8.71      ///Runs %BFS algorithm from node \c s.
    8.72 @@ -882,8 +882,8 @@
    8.73      /// \param g is the initial value of  \ref _g
    8.74      /// \param s is the initial value of  \ref _source
    8.75      BfsWizardBase(const GR &g, Node s=INVALID) :
    8.76 -      _g((void *)&g), _reached(0), _processed(0), _pred(0),
    8.77 -      _dist(0), _source(s) {}
    8.78 +      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))), 
    8.79 +      _reached(0), _processed(0), _pred(0), _dist(0), _source(s) {}
    8.80  
    8.81    };
    8.82    
    8.83 @@ -957,12 +957,15 @@
    8.84      void run()
    8.85      {
    8.86        if(Base::_source==INVALID) throw UninitializedParameter();
    8.87 -      Bfs<Graph,TR> alg(*(Graph*)Base::_g);
    8.88 +      Bfs<Graph,TR> alg(*reinterpret_cast<const Graph*>(Base::_g));
    8.89        if(Base::_reached)
    8.90 -	alg.reachedMap(*(ReachedMap*)Base::_reached);
    8.91 -      if(Base::_processed) alg.processedMap(*(ProcessedMap*)Base::_processed);
    8.92 -      if(Base::_pred) alg.predMap(*(PredMap*)Base::_pred);
    8.93 -      if(Base::_dist) alg.distMap(*(DistMap*)Base::_dist);
    8.94 +	alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
    8.95 +      if(Base::_processed) 
    8.96 +        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
    8.97 +      if(Base::_pred) 
    8.98 +        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
    8.99 +      if(Base::_dist) 
   8.100 +        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
   8.101        alg.run(Base::_source);
   8.102      }
   8.103  
   8.104 @@ -992,7 +995,7 @@
   8.105      template<class T>
   8.106      BfsWizard<DefPredMapBase<T> > predMap(const T &t) 
   8.107      {
   8.108 -      Base::_pred=(void *)&t;
   8.109 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   8.110        return BfsWizard<DefPredMapBase<T> >(*this);
   8.111      }
   8.112      
   8.113 @@ -1013,7 +1016,7 @@
   8.114      template<class T>
   8.115      BfsWizard<DefReachedMapBase<T> > reachedMap(const T &t) 
   8.116      {
   8.117 -      Base::_pred=(void *)&t;
   8.118 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   8.119        return BfsWizard<DefReachedMapBase<T> >(*this);
   8.120      }
   8.121      
   8.122 @@ -1034,7 +1037,7 @@
   8.123      template<class T>
   8.124      BfsWizard<DefProcessedMapBase<T> > processedMap(const T &t) 
   8.125      {
   8.126 -      Base::_pred=(void *)&t;
   8.127 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   8.128        return BfsWizard<DefProcessedMapBase<T> >(*this);
   8.129      }
   8.130      
   8.131 @@ -1055,7 +1058,7 @@
   8.132      template<class T>
   8.133      BfsWizard<DefDistMapBase<T> > distMap(const T &t) 
   8.134      {
   8.135 -      Base::_dist=(void *)&t;
   8.136 +      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   8.137        return BfsWizard<DefDistMapBase<T> >(*this);
   8.138      }
   8.139      
   8.140 @@ -1404,11 +1407,11 @@
   8.141      /// parameter should be initially false.
   8.142      ///
   8.143      /// \param target The target node.
   8.144 -    /// \retval reached Indicates that the target node is reached.
   8.145 +    /// \retval reach Indicates that the target node is reached.
   8.146      /// \return The processed node.
   8.147      ///
   8.148      /// \warning The queue must not be empty!
   8.149 -    Node processNextNode(Node target, bool& reached) {
   8.150 +    Node processNextNode(Node target, bool& reach) {
   8.151        Node n = _list[++_list_front];
   8.152        _visitor->process(n);
   8.153        Edge e;
   8.154 @@ -1419,7 +1422,7 @@
   8.155            _visitor->reach(m);
   8.156            _reached->set(m, true);
   8.157            _list[++_list_back] = m;
   8.158 -          reached = reached || (target == m);
   8.159 +          reach = reach || (target == m);
   8.160          } else {
   8.161            _visitor->examine(e);
   8.162          }
   8.163 @@ -1441,7 +1444,7 @@
   8.164      ///
   8.165      /// \warning The queue must not be empty!
   8.166      template <typename NM>
   8.167 -    Node processNextNode(const NM& nm, bool& reached) {
   8.168 +    Node processNextNode(const NM& nm, bool& reach) {
   8.169        Node n = _list[++_list_front];
   8.170        _visitor->process(n);
   8.171        Edge e;
   8.172 @@ -1452,7 +1455,7 @@
   8.173            _visitor->reach(m);
   8.174            _reached->set(m, true);
   8.175            _list[++_list_back] = m;
   8.176 -          reached = reached || nm[m];
   8.177 +          reach = reach || nm[m];
   8.178          } else {
   8.179            _visitor->examine(e);
   8.180          }
   8.181 @@ -1499,9 +1502,9 @@
   8.182      /// \pre init() must be called and at least one node should be added
   8.183      /// with addSource() before using this function.
   8.184      void start(Node dest) {
   8.185 -      bool reached = false;
   8.186 -      while (!emptyQueue() && !reached) { 
   8.187 -	processNextNode(dest, reached);
   8.188 +      bool reach = false;
   8.189 +      while (!emptyQueue() && !reach) { 
   8.190 +	processNextNode(dest, reach);
   8.191        }
   8.192      }
   8.193      
   8.194 @@ -1517,9 +1520,9 @@
   8.195      /// <tt>nm[v]</tt> true.
   8.196      template <typename NM>
   8.197      void start(const NM &nm) {
   8.198 -      bool reached = false;
   8.199 -      while (!emptyQueue() && !reached) {
   8.200 -        processNextNode(nm, reached);
   8.201 +      bool reach = false;
   8.202 +      while (!emptyQueue() && !reach) {
   8.203 +        processNextNode(nm, reach);
   8.204        }
   8.205      }
   8.206  
     9.1 --- a/lemon/bipartite_matching.h	Fri Mar 02 17:56:22 2007 +0000
     9.2 +++ b/lemon/bipartite_matching.h	Fri Mar 02 18:04:28 2007 +0000
     9.3 @@ -115,7 +115,7 @@
     9.4      ///
     9.5      /// It initalizes the data structures with an initial matching.
     9.6      template <typename MatchingMap>
     9.7 -    void matchingInit(const MatchingMap& matching) {
     9.8 +    void matchingInit(const MatchingMap& mm) {
     9.9        for (ANodeIt it(*graph); it != INVALID; ++it) {
    9.10          anode_matching[it] = INVALID;
    9.11        }
    9.12 @@ -124,7 +124,7 @@
    9.13        }
    9.14        matching_size = 0;
    9.15        for (UEdgeIt it(*graph); it != INVALID; ++it) {
    9.16 -        if (matching[it]) {
    9.17 +        if (mm[it]) {
    9.18            ++matching_size;
    9.19            anode_matching[graph->aNode(it)] = it;
    9.20            bnode_matching[graph->bNode(it)] = it;
    9.21 @@ -137,7 +137,7 @@
    9.22      /// It initalizes the data structures with an initial matching.
    9.23      /// \return %True when the given map contains really a matching.
    9.24      template <typename MatchingMap>
    9.25 -    void checkedMatchingInit(const MatchingMap& matching) {
    9.26 +    void checkedMatchingInit(const MatchingMap& mm) {
    9.27        for (ANodeIt it(*graph); it != INVALID; ++it) {
    9.28          anode_matching[it] = INVALID;
    9.29        }
    9.30 @@ -146,7 +146,7 @@
    9.31        }
    9.32        matching_size = 0;
    9.33        for (UEdgeIt it(*graph); it != INVALID; ++it) {
    9.34 -        if (matching[it]) {
    9.35 +        if (mm[it]) {
    9.36            ++matching_size;
    9.37            if (anode_matching[graph->aNode(it)] != INVALID) {
    9.38              return false;
    9.39 @@ -187,7 +187,7 @@
    9.40  
    9.41        while (!success && !queue.empty()) {
    9.42          std::vector<Node> newqueue;
    9.43 -        for (int i = 0; i < (int)queue.size(); ++i) {
    9.44 +        for (int i = 0; i < int(queue.size()); ++i) {
    9.45            Node anode = queue[i];
    9.46            for (IncEdgeIt jt(*graph, anode); jt != INVALID; ++jt) {
    9.47              Node bnode = graph->bNode(jt);
    9.48 @@ -213,7 +213,7 @@
    9.49  
    9.50          typename Graph::template ANodeMap<bool> aused(*graph, false);
    9.51          
    9.52 -        for (int i = 0; i < (int)bqueue.size(); ++i) {
    9.53 +        for (int i = 0; i < int(bqueue.size()); ++i) {
    9.54            Node bnode = bqueue[i];
    9.55  
    9.56            bool used = false;
    9.57 @@ -279,7 +279,7 @@
    9.58  
    9.59        while (!queue.empty()) {
    9.60          std::vector<Node> newqueue;
    9.61 -        for (int i = 0; i < (int)queue.size(); ++i) {
    9.62 +        for (int i = 0; i < int(queue.size()); ++i) {
    9.63            Node anode = queue[i];
    9.64            for (IncEdgeIt jt(*graph, anode); jt != INVALID; ++jt) {
    9.65              Node bnode = graph->bNode(jt);
    9.66 @@ -363,7 +363,7 @@
    9.67  
    9.68        while (!queue.empty()) {
    9.69          std::vector<Node> newqueue;
    9.70 -        for (int i = 0; i < (int)queue.size(); ++i) {
    9.71 +        for (int i = 0; i < int(queue.size()); ++i) {
    9.72            Node anode = queue[i];
    9.73            for (IncEdgeIt jt(*graph, anode); jt != INVALID; ++jt) {
    9.74              Node bnode = graph->bNode(jt);
    9.75 @@ -403,10 +403,10 @@
    9.76      /// value mapped to the other uedges.
    9.77      /// \return The number of the matching edges.
    9.78      template <typename MatchingMap>
    9.79 -    int quickMatching(MatchingMap& matching) const {
    9.80 +    int quickMatching(MatchingMap& mm) const {
    9.81        for (ANodeIt it(*graph); it != INVALID; ++it) {
    9.82          if (anode_matching[it] != INVALID) {
    9.83 -          matching[anode_matching[it]] = true;
    9.84 +          mm[anode_matching[it]] = true;
    9.85          }
    9.86        }
    9.87        return matching_size;
    9.88 @@ -417,9 +417,9 @@
    9.89      /// Set true all matching uedge in the map and the others to false.
    9.90      /// \return The number of the matching edges.
    9.91      template <typename MatchingMap>
    9.92 -    int matching(MatchingMap& matching) const {
    9.93 +    int matching(MatchingMap& mm) const {
    9.94        for (UEdgeIt it(*graph); it != INVALID; ++it) {
    9.95 -        matching[it] = it == anode_matching[graph->aNode(it)];
    9.96 +        mm[it] = it == anode_matching[graph->aNode(it)];
    9.97        }
    9.98        return matching_size;
    9.99      }
   9.100 @@ -683,17 +683,17 @@
   9.101      /// it will allocate one. The destuctor deallocates this
   9.102      /// automatically allocated map, of course.
   9.103      /// \return \c (*this)
   9.104 -    MaxWeightedBipartiteMatching& heap(Heap& heap, HeapCrossRef &crossRef) {
   9.105 +    MaxWeightedBipartiteMatching& heap(Heap& hp, HeapCrossRef &cr) {
   9.106        if(local_heap_cross_ref) {
   9.107  	delete _heap_cross_ref;
   9.108  	local_heap_cross_ref = false;
   9.109        }
   9.110 -      _heap_cross_ref = &crossRef;
   9.111 +      _heap_cross_ref = &cr;
   9.112        if(local_heap) {
   9.113  	delete _heap;
   9.114  	local_heap = false;
   9.115        }
   9.116 -      _heap = &heap;
   9.117 +      _heap = &hp;
   9.118        return *this;
   9.119      }
   9.120  
   9.121 @@ -889,12 +889,12 @@
   9.122      /// for each matching edges and \f$ \pi(a) + \pi(b) - w(ab) \ge 0 \f$
   9.123      /// for each edges. 
   9.124      template <typename PotentialMap>
   9.125 -    void potential(PotentialMap& potential) const {
   9.126 +    void potential(PotentialMap& pt) const {
   9.127        for (ANodeIt it(*graph); it != INVALID; ++it) {
   9.128 -        potential[it] = anode_potential[it];
   9.129 +        pt[it] = anode_potential[it];
   9.130        }
   9.131        for (BNodeIt it(*graph); it != INVALID; ++it) {
   9.132 -        potential[it] = bnode_potential[it];
   9.133 +        pt[it] = bnode_potential[it];
   9.134        }
   9.135      }
   9.136  
   9.137 @@ -904,10 +904,10 @@
   9.138      /// value mapped to the other uedges.
   9.139      /// \return The number of the matching edges.
   9.140      template <typename MatchingMap>
   9.141 -    int quickMatching(MatchingMap& matching) const {
   9.142 +    int quickMatching(MatchingMap& mm) const {
   9.143        for (ANodeIt it(*graph); it != INVALID; ++it) {
   9.144          if (anode_matching[it] != INVALID) {
   9.145 -          matching[anode_matching[it]] = true;
   9.146 +          mm[anode_matching[it]] = true;
   9.147          }
   9.148        }
   9.149        return matching_size;
   9.150 @@ -918,9 +918,9 @@
   9.151      /// Set true all matching uedge in the map and the others to false.
   9.152      /// \return The number of the matching edges.
   9.153      template <typename MatchingMap>
   9.154 -    int matching(MatchingMap& matching) const {
   9.155 +    int matching(MatchingMap& mm) const {
   9.156        for (UEdgeIt it(*graph); it != INVALID; ++it) {
   9.157 -        matching[it] = it == anode_matching[graph->aNode(it)];
   9.158 +        mm[it] = it == anode_matching[graph->aNode(it)];
   9.159        }
   9.160        return matching_size;
   9.161      }
   9.162 @@ -1254,17 +1254,17 @@
   9.163      /// it will allocate one. The destuctor deallocates this
   9.164      /// automatically allocated map, of course.
   9.165      /// \return \c (*this)
   9.166 -    MinCostMaxBipartiteMatching& heap(Heap& heap, HeapCrossRef &crossRef) {
   9.167 +    MinCostMaxBipartiteMatching& heap(Heap& hp, HeapCrossRef &cr) {
   9.168        if(local_heap_cross_ref) {
   9.169  	delete _heap_cross_ref;
   9.170  	local_heap_cross_ref = false;
   9.171        }
   9.172 -      _heap_cross_ref = &crossRef;
   9.173 +      _heap_cross_ref = &cr;
   9.174        if(local_heap) {
   9.175  	delete _heap;
   9.176  	local_heap = false;
   9.177        }
   9.178 -      _heap = &heap;
   9.179 +      _heap = &hp;
   9.180        return *this;
   9.181      }
   9.182  
   9.183 @@ -1442,12 +1442,12 @@
   9.184      /// each matching edges and \f$ \pi(a) - \pi(b) + w(ab) \ge 0 \f$
   9.185      /// for each edges.
   9.186      template <typename PotentialMap>
   9.187 -    void potential(PotentialMap& potential) const {
   9.188 +    void potential(PotentialMap& pt) const {
   9.189        for (ANodeIt it(*graph); it != INVALID; ++it) {
   9.190 -        potential[it] = anode_potential[it];
   9.191 +        pt[it] = anode_potential[it];
   9.192        }
   9.193        for (BNodeIt it(*graph); it != INVALID; ++it) {
   9.194 -        potential[it] = bnode_potential[it];
   9.195 +        pt[it] = bnode_potential[it];
   9.196        }
   9.197      }
   9.198  
   9.199 @@ -1457,10 +1457,10 @@
   9.200      /// value mapped to the other uedges.
   9.201      /// \return The number of the matching edges.
   9.202      template <typename MatchingMap>
   9.203 -    int quickMatching(MatchingMap& matching) const {
   9.204 +    int quickMatching(MatchingMap& mm) const {
   9.205        for (ANodeIt it(*graph); it != INVALID; ++it) {
   9.206          if (anode_matching[it] != INVALID) {
   9.207 -          matching[anode_matching[it]] = true;
   9.208 +          mm[anode_matching[it]] = true;
   9.209          }
   9.210        }
   9.211        return matching_size;
   9.212 @@ -1471,9 +1471,9 @@
   9.213      /// Set true all matching uedge in the map and the others to false.
   9.214      /// \return The number of the matching edges.
   9.215      template <typename MatchingMap>
   9.216 -    int matching(MatchingMap& matching) const {
   9.217 +    int matching(MatchingMap& mm) const {
   9.218        for (UEdgeIt it(*graph); it != INVALID; ++it) {
   9.219 -        matching[it] = it == anode_matching[graph->aNode(it)];
   9.220 +        mm[it] = it == anode_matching[graph->aNode(it)];
   9.221        }
   9.222        return matching_size;
   9.223      }
    10.1 --- a/lemon/bits/alteration_notifier.h	Fri Mar 02 17:56:22 2007 +0000
    10.2 +++ b/lemon/bits/alteration_notifier.h	Fri Mar 02 18:04:28 2007 +0000
    10.3 @@ -148,8 +148,8 @@
    10.4        /// \brief Constructor which attach the observer into notifier.
    10.5        ///
    10.6        /// Constructor which attach the observer into notifier.
    10.7 -      ObserverBase(AlterationNotifier& notifier) {
    10.8 -        attach(notifier);
    10.9 +      ObserverBase(AlterationNotifier& nf) {
   10.10 +        attach(nf);
   10.11        }
   10.12  
   10.13        /// \brief Constructor which attach the obserever to the same notifier.
   10.14 @@ -158,7 +158,7 @@
   10.15        /// the other observer is attached to. 
   10.16        ObserverBase(const ObserverBase& copy) {
   10.17  	if (copy.attached()) {
   10.18 -          attach(*copy._notifier());
   10.19 +          attach(*copy.notifier());
   10.20  	}
   10.21        }
   10.22  	
   10.23 @@ -173,8 +173,8 @@
   10.24        ///
   10.25        /// This member attaches the observer into an AlterationNotifier.
   10.26        ///
   10.27 -      void attach(AlterationNotifier& notifier) {
   10.28 -	notifier.attach(*this);
   10.29 +      void attach(AlterationNotifier& nf) {
   10.30 +	nf.attach(*this);
   10.31        }
   10.32        
   10.33        /// \brief Detaches the observer into an AlterationNotifier.
    11.1 --- a/lemon/bits/array_map.h	Fri Mar 02 17:56:22 2007 +0000
    11.2 +++ b/lemon/bits/array_map.h	Fri Mar 02 18:04:28 2007 +0000
    11.3 @@ -81,10 +81,10 @@
    11.4      explicit ArrayMap(const Graph& graph) {
    11.5        Parent::attach(graph.notifier(Item()));
    11.6        allocate_memory();
    11.7 -      Notifier* notifier = Parent::notifier();
    11.8 +      Notifier* nf = Parent::notifier();
    11.9        Item it;
   11.10 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.11 -	int id = notifier->id(it);;
   11.12 +      for (nf->first(it); it != INVALID; nf->next(it)) {
   11.13 +	int id = nf->id(it);;
   11.14  	allocator.construct(&(values[id]), Value());
   11.15        }								
   11.16      }
   11.17 @@ -95,10 +95,10 @@
   11.18      ArrayMap(const Graph& graph, const Value& value) {
   11.19        Parent::attach(graph.notifier(Item()));
   11.20        allocate_memory();
   11.21 -      Notifier* notifier = Parent::notifier();
   11.22 +      Notifier* nf = Parent::notifier();
   11.23        Item it;
   11.24 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.25 -	int id = notifier->id(it);;
   11.26 +      for (nf->first(it); it != INVALID; nf->next(it)) {
   11.27 +	int id = nf->id(it);;
   11.28  	allocator.construct(&(values[id]), value);
   11.29        }								
   11.30      }
   11.31 @@ -113,10 +113,10 @@
   11.32        capacity = copy.capacity;
   11.33        if (capacity == 0) return;
   11.34        values = allocator.allocate(capacity);
   11.35 -      Notifier* notifier = Parent::notifier();
   11.36 +      Notifier* nf = Parent::notifier();
   11.37        Item it;
   11.38 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.39 -	int id = notifier->id(it);;
   11.40 +      for (nf->first(it); it != INVALID; nf->next(it)) {
   11.41 +	int id = nf->id(it);;
   11.42  	allocator.construct(&(values[id]), copy.values[id]);
   11.43        }
   11.44      }
   11.45 @@ -142,9 +142,9 @@
   11.46      template <typename CMap>
   11.47      ArrayMap& operator=(const CMap& cmap) {
   11.48        checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
   11.49 -      const typename Parent::Notifier* notifier = Parent::notifier();
   11.50 +      const typename Parent::Notifier* nf = Parent::notifier();
   11.51        Item it;
   11.52 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.53 +      for (nf->first(it); it != INVALID; nf->next(it)) {
   11.54          set(it, cmap[it]);
   11.55        }
   11.56        return *this;
   11.57 @@ -201,8 +201,8 @@
   11.58      /// It adds a new key to the map. It called by the observer notifier
   11.59      /// and it overrides the add() member function of the observer base.     
   11.60      virtual void add(const Key& key) {
   11.61 -      Notifier* notifier = Parent::notifier();
   11.62 -      int id = notifier->id(key);
   11.63 +      Notifier* nf = Parent::notifier();
   11.64 +      int id = nf->id(key);
   11.65        if (id >= capacity) {
   11.66  	int new_capacity = (capacity == 0 ? 1 : capacity);
   11.67  	while (new_capacity <= id) {
   11.68 @@ -210,8 +210,8 @@
   11.69  	}
   11.70  	Value* new_values = allocator.allocate(new_capacity);
   11.71  	Item it;
   11.72 -	for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.73 -	  int jd = notifier->id(it);;
   11.74 +	for (nf->first(it); it != INVALID; nf->next(it)) {
   11.75 +	  int jd = nf->id(it);;
   11.76  	  if (id != jd) {
   11.77  	    allocator.construct(&(new_values[jd]), values[jd]);
   11.78  	    allocator.destroy(&(values[jd]));
   11.79 @@ -229,10 +229,10 @@
   11.80      /// It adds more new keys to the map. It called by the observer notifier
   11.81      /// and it overrides the add() member function of the observer base.     
   11.82      virtual void add(const std::vector<Key>& keys) {
   11.83 -      Notifier* notifier = Parent::notifier();
   11.84 +      Notifier* nf = Parent::notifier();
   11.85        int max_id = -1;
   11.86 -      for (int i = 0; i < (int)keys.size(); ++i) {
   11.87 -	int id = notifier->id(keys[i]);
   11.88 +      for (int i = 0; i < int(keys.size()); ++i) {
   11.89 +	int id = nf->id(keys[i]);
   11.90  	if (id > max_id) {
   11.91  	  max_id = id;
   11.92  	}
   11.93 @@ -244,11 +244,11 @@
   11.94  	}
   11.95  	Value* new_values = allocator.allocate(new_capacity);
   11.96  	Item it;
   11.97 -	for (notifier->first(it); it != INVALID; notifier->next(it)) {
   11.98 -	  int id = notifier->id(it);
   11.99 +	for (nf->first(it); it != INVALID; nf->next(it)) {
  11.100 +	  int id = nf->id(it);
  11.101  	  bool found = false;
  11.102 -	  for (int i = 0; i < (int)keys.size(); ++i) {
  11.103 -	    int jd = notifier->id(keys[i]);
  11.104 +	  for (int i = 0; i < int(keys.size()); ++i) {
  11.105 +	    int jd = nf->id(keys[i]);
  11.106  	    if (id == jd) {
  11.107  	      found = true;
  11.108  	      break;
  11.109 @@ -262,8 +262,8 @@
  11.110  	values = new_values;
  11.111  	capacity = new_capacity;
  11.112        }
  11.113 -      for (int i = 0; i < (int)keys.size(); ++i) {
  11.114 -	int id = notifier->id(keys[i]);
  11.115 +      for (int i = 0; i < int(keys.size()); ++i) {
  11.116 +	int id = nf->id(keys[i]);
  11.117  	allocator.construct(&(values[id]), Value());
  11.118        }
  11.119      }
  11.120 @@ -282,7 +282,7 @@
  11.121      /// Erase more keys from the map. It called by the observer notifier
  11.122      /// and it overrides the erase() member function of the observer base.     
  11.123      virtual void erase(const std::vector<Key>& keys) {
  11.124 -      for (int i = 0; i < (int)keys.size(); ++i) {
  11.125 +      for (int i = 0; i < int(keys.size()); ++i) {
  11.126  	int id = Parent::notifier()->id(keys[i]);
  11.127  	allocator.destroy(&(values[id]));
  11.128        }
  11.129 @@ -293,11 +293,11 @@
  11.130      /// It buildes the map. It called by the observer notifier
  11.131      /// and it overrides the build() member function of the observer base. 
  11.132      virtual void build() {
  11.133 -      Notifier* notifier = Parent::notifier();
  11.134 +      Notifier* nf = Parent::notifier();
  11.135        allocate_memory();
  11.136        Item it;
  11.137 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
  11.138 -	int id = notifier->id(it);;
  11.139 +      for (nf->first(it); it != INVALID; nf->next(it)) {
  11.140 +	int id = nf->id(it);;
  11.141  	allocator.construct(&(values[id]), Value());
  11.142        }								
  11.143      }
  11.144 @@ -307,11 +307,11 @@
  11.145      /// It erase all items from the map. It called by the observer notifier
  11.146      /// and it overrides the clear() member function of the observer base.     
  11.147      virtual void clear() {	
  11.148 -      Notifier* notifier = Parent::notifier();
  11.149 +      Notifier* nf = Parent::notifier();
  11.150        if (capacity != 0) {
  11.151  	Item it;
  11.152 -	for (notifier->first(it); it != INVALID; notifier->next(it)) {
  11.153 -	  int id = notifier->id(it);
  11.154 +	for (nf->first(it); it != INVALID; nf->next(it)) {
  11.155 +	  int id = nf->id(it);
  11.156  	  allocator.destroy(&(values[id]));
  11.157  	}								
  11.158  	allocator.deallocate(values, capacity);
    12.1 --- a/lemon/bits/base_extender.h	Fri Mar 02 17:56:22 2007 +0000
    12.2 +++ b/lemon/bits/base_extender.h	Fri Mar 02 18:04:28 2007 +0000
    12.3 @@ -193,16 +193,16 @@
    12.4        }
    12.5      }
    12.6  
    12.7 -    Node nodeFromId(int id) const {
    12.8 -      return Parent::nodeFromId(id);
    12.9 +    Node nodeFromId(int ix) const {
   12.10 +      return Parent::nodeFromId(ix);
   12.11      }
   12.12  
   12.13 -    Edge edgeFromId(int id) const {
   12.14 -      return direct(Parent::edgeFromId(id >> 1), bool(id & 1));
   12.15 +    Edge edgeFromId(int ix) const {
   12.16 +      return direct(Parent::edgeFromId(ix >> 1), bool(ix & 1));
   12.17      }
   12.18  
   12.19 -    UEdge uEdgeFromId(int id) const {
   12.20 -      return Parent::edgeFromId(id);
   12.21 +    UEdge uEdgeFromId(int ix) const {
   12.22 +      return Parent::edgeFromId(ix);
   12.23      }
   12.24  
   12.25      int id(const Node &n) const {
   12.26 @@ -238,42 +238,42 @@
   12.27        return Parent::edgeNum();
   12.28      }
   12.29  
   12.30 -    Edge findEdge(Node source, Node target, Edge prev = INVALID) const {
   12.31 -      if (prev == INVALID) {
   12.32 -	UEdge edge = Parent::findEdge(source, target);
   12.33 +    Edge findEdge(Node s, Node t, Edge p = INVALID) const {
   12.34 +      if (p == INVALID) {
   12.35 +	UEdge edge = Parent::findEdge(s, t);
   12.36  	if (edge != INVALID) return direct(edge, true);
   12.37 -	edge = Parent::findEdge(target, source);
   12.38 +	edge = Parent::findEdge(t, s);
   12.39  	if (edge != INVALID) return direct(edge, false);
   12.40 -      } else if (direction(prev)) {
   12.41 -	UEdge edge = Parent::findEdge(source, target, prev);
   12.42 +      } else if (direction(p)) {
   12.43 +	UEdge edge = Parent::findEdge(s, t, p);
   12.44  	if (edge != INVALID) return direct(edge, true);
   12.45 -	edge = Parent::findEdge(target, source);
   12.46 +	edge = Parent::findEdge(t, s);
   12.47  	if (edge != INVALID) return direct(edge, false);	
   12.48        } else {
   12.49 -	UEdge edge = Parent::findEdge(target, source, prev);
   12.50 +	UEdge edge = Parent::findEdge(t, s, p);
   12.51  	if (edge != INVALID) return direct(edge, false);	      
   12.52        }
   12.53        return INVALID;
   12.54      }
   12.55  
   12.56 -    UEdge findUEdge(Node source, Node target, UEdge prev = INVALID) const {
   12.57 -      if (source != target) {
   12.58 -        if (prev == INVALID) {
   12.59 -          UEdge edge = Parent::findEdge(source, target);
   12.60 +    UEdge findUEdge(Node s, Node t, UEdge p = INVALID) const {
   12.61 +      if (s != t) {
   12.62 +        if (p == INVALID) {
   12.63 +          UEdge edge = Parent::findEdge(s, t);
   12.64            if (edge != INVALID) return edge;
   12.65 -          edge = Parent::findEdge(target, source);
   12.66 +          edge = Parent::findEdge(t, s);
   12.67            if (edge != INVALID) return edge;
   12.68 -        } else if (Parent::source(prev) == source) {
   12.69 -          UEdge edge = Parent::findEdge(source, target, prev);
   12.70 +        } else if (Parent::s(p) == s) {
   12.71 +          UEdge edge = Parent::findEdge(s, t, p);
   12.72            if (edge != INVALID) return edge;
   12.73 -          edge = Parent::findEdge(target, source);
   12.74 +          edge = Parent::findEdge(t, s);
   12.75            if (edge != INVALID) return edge;	
   12.76          } else {
   12.77 -          UEdge edge = Parent::findEdge(target, source, prev);
   12.78 +          UEdge edge = Parent::findEdge(t, s, p);
   12.79            if (edge != INVALID) return edge;	      
   12.80          }
   12.81        } else {
   12.82 -        return Parent::findEdge(source, target, prev);
   12.83 +        return Parent::findEdge(s, t, p);
   12.84        }
   12.85        return INVALID;
   12.86      }
   12.87 @@ -357,21 +357,21 @@
   12.88        return bNode(edge);
   12.89      }
   12.90  
   12.91 -    void firstInc(UEdge& edge, bool& direction, const Node& node) const {
   12.92 +    void firstInc(UEdge& edge, bool& dir, const Node& node) const {
   12.93        if (Parent::aNode(node)) {
   12.94  	Parent::firstFromANode(edge, node);
   12.95 -	direction = true;
   12.96 +	dir = true;
   12.97        } else {
   12.98  	Parent::firstFromBNode(edge, node);
   12.99 -	direction = static_cast<UEdge&>(edge) == INVALID;
  12.100 +	dir = static_cast<UEdge&>(edge) == INVALID;
  12.101        }
  12.102      }
  12.103 -    void nextInc(UEdge& edge, bool& direction) const {
  12.104 -      if (direction) {
  12.105 +    void nextInc(UEdge& edge, bool& dir) const {
  12.106 +      if (dir) {
  12.107  	Parent::nextFromANode(edge);
  12.108        } else {
  12.109  	Parent::nextFromBNode(edge);
  12.110 -	if (edge == INVALID) direction = true;
  12.111 +	if (edge == INVALID) dir = true;
  12.112        }
  12.113      }
  12.114  
  12.115 @@ -457,8 +457,8 @@
  12.116        return (Parent::id(static_cast<const UEdge&>(edge)) << 1) + 
  12.117          (edge.forward ? 0 : 1);
  12.118      }
  12.119 -    Edge edgeFromId(int id) const {
  12.120 -      return Edge(Parent::fromUEdgeId(id >> 1), (id & 1) == 0);
  12.121 +    Edge edgeFromId(int ix) const {
  12.122 +      return Edge(Parent::fromUEdgeId(ix >> 1), (ix & 1) == 0);
  12.123      }
  12.124      int maxEdgeId() const {
  12.125        return (Parent::maxUEdgeId() << 1) + 1;
  12.126 @@ -468,8 +468,8 @@
  12.127        return edge.forward;
  12.128      }
  12.129  
  12.130 -    Edge direct(const UEdge& edge, bool direction) const {
  12.131 -      return Edge(edge, direction);
  12.132 +    Edge direct(const UEdge& edge, bool dir) const {
  12.133 +      return Edge(edge, dir);
  12.134      }
  12.135  
  12.136      int edgeNum() const {
    13.1 --- a/lemon/bits/debug_map.h	Fri Mar 02 17:56:22 2007 +0000
    13.2 +++ b/lemon/bits/debug_map.h	Fri Mar 02 18:04:28 2007 +0000
    13.3 @@ -165,7 +165,7 @@
    13.4            flag[Parent::notifier()->id(it)] = false;
    13.5          }
    13.6        }
    13.7 -      for (int i = 0; i < (int)flag.size(); ++i) {
    13.8 +      for (int i = 0; i < int(flag.size()); ++i) {
    13.9          LEMON_ASSERT(!flag[i], MapError());
   13.10        }
   13.11      }
   13.12 @@ -235,7 +235,7 @@
   13.13      /// and it overrides the add() member function of the observer base.     
   13.14      virtual void add(const Key& key) {
   13.15        int id = Parent::notifier()->id(key);
   13.16 -      if (id >= (int)container.size()) {
   13.17 +      if (id >= int(container.size())) {
   13.18  	container.resize(id + 1);
   13.19          flag.resize(id + 1, false);
   13.20        }
   13.21 @@ -246,8 +246,8 @@
   13.22          const typename Parent::Notifier* notifier = Parent::notifier();
   13.23          Item it;
   13.24          for (notifier->first(it); it != INVALID; notifier->next(it)) {
   13.25 -          int id = Parent::notifier()->id(it);
   13.26 -          fl[id] = true;
   13.27 +          int jd = Parent::notifier()->id(it);
   13.28 +          fl[jd] = true;
   13.29          }
   13.30          LEMON_ASSERT(fl == flag, MapError());
   13.31        }
   13.32 @@ -259,7 +259,7 @@
   13.33      /// and it overrides the add() member function of the observer base.     
   13.34      virtual void add(const std::vector<Key>& keys) {
   13.35        int max = container.size() - 1;
   13.36 -      for (int i = 0; i < (int)keys.size(); ++i) {
   13.37 +      for (int i = 0; i < int(keys.size()); ++i) {
   13.38          int id = Parent::notifier()->id(keys[i]);
   13.39          if (id >= max) {
   13.40            max = id;
   13.41 @@ -267,7 +267,7 @@
   13.42        }
   13.43        container.resize(max + 1);
   13.44        flag.resize(max + 1, false);
   13.45 -      for (int i = 0; i < (int)keys.size(); ++i) {
   13.46 +      for (int i = 0; i < int(keys.size()); ++i) {
   13.47          LEMON_ASSERT(!flag[Parent::notifier()->id(keys[i])], MapError());
   13.48          flag[Parent::notifier()->id(keys[i])] = true;
   13.49        }
   13.50 @@ -318,7 +318,7 @@
   13.51          }
   13.52          LEMON_ASSERT(fl == flag, MapError());
   13.53        }
   13.54 -      for (int i = 0; i < (int)keys.size(); ++i) {
   13.55 +      for (int i = 0; i < int(keys.size()); ++i) {
   13.56  	container[Parent::notifier()->id(keys[i])] = Value();
   13.57          LEMON_ASSERT(flag[Parent::notifier()->id(keys[i])], MapError());
   13.58          flag[Parent::notifier()->id(keys[i])] = false;
   13.59 @@ -331,7 +331,7 @@
   13.60      /// and it overrides the build() member function of the observer base.
   13.61      virtual void build() { 
   13.62        if (strictCheck) {
   13.63 -        for (int i = 0; i < (int)flag.size(); ++i) {
   13.64 +        for (int i = 0; i < int(flag.size()); ++i) {
   13.65            LEMON_ASSERT(flag[i], MapError());
   13.66          }
   13.67        }
   13.68 @@ -362,7 +362,7 @@
   13.69          flag[id] = false;
   13.70        }
   13.71        if (strictCheck) {
   13.72 -        for (int i = 0; i < (int)flag.size(); ++i) {
   13.73 +        for (int i = 0; i < int(flag.size()); ++i) {
   13.74            LEMON_ASSERT(!flag[i], MapError());
   13.75          }
   13.76        }
    14.1 --- a/lemon/bits/edge_set_extender.h	Fri Mar 02 17:56:22 2007 +0000
    14.2 +++ b/lemon/bits/edge_set_extender.h	Fri Mar 02 18:04:28 2007 +0000
    14.3 @@ -189,28 +189,28 @@
    14.4      ///
    14.5      /// Returns the base node (ie. the source in this case) of the iterator
    14.6      Node baseNode(const OutEdgeIt &e) const {
    14.7 -      return Parent::source((Edge)e);
    14.8 +      return Parent::source(static_cast<const Edge&>(e));
    14.9      }
   14.10      /// \brief Running node of the iterator
   14.11      ///
   14.12      /// Returns the running node (ie. the target in this case) of the
   14.13      /// iterator
   14.14      Node runningNode(const OutEdgeIt &e) const {
   14.15 -      return Parent::target((Edge)e);
   14.16 +      return Parent::target(static_cast<const Edge&>(e));
   14.17      }
   14.18  
   14.19      /// \brief Base node of the iterator
   14.20      ///
   14.21      /// Returns the base node (ie. the target in this case) of the iterator
   14.22      Node baseNode(const InEdgeIt &e) const {
   14.23 -      return Parent::target((Edge)e);
   14.24 +      return Parent::target(static_cast<const Edge&>(e));
   14.25      }
   14.26      /// \brief Running node of the iterator
   14.27      ///
   14.28      /// Returns the running node (ie. the source in this case) of the
   14.29      /// iterator
   14.30      Node runningNode(const InEdgeIt &e) const {
   14.31 -      return Parent::source((Edge)e);
   14.32 +      return Parent::source(static_cast<const Edge&>(e));
   14.33      }
   14.34  
   14.35      using Parent::first;
   14.36 @@ -496,28 +496,28 @@
   14.37      ///
   14.38      /// Returns the base node (ie. the source in this case) of the iterator
   14.39      Node baseNode(const OutEdgeIt &e) const {
   14.40 -      return Parent::source((Edge)e);
   14.41 +      return Parent::source(static_cast<const Edge&>(e));
   14.42      }
   14.43      /// \brief Running node of the iterator
   14.44      ///
   14.45      /// Returns the running node (ie. the target in this case) of the
   14.46      /// iterator
   14.47      Node runningNode(const OutEdgeIt &e) const {
   14.48 -      return Parent::target((Edge)e);
   14.49 +      return Parent::target(static_cast<const Edge&>(e));
   14.50      }
   14.51  
   14.52      /// \brief Base node of the iterator
   14.53      ///
   14.54      /// Returns the base node (ie. the target in this case) of the iterator
   14.55      Node baseNode(const InEdgeIt &e) const {
   14.56 -      return Parent::target((Edge)e);
   14.57 +      return Parent::target(static_cast<const Edge&>(e));
   14.58      }
   14.59      /// \brief Running node of the iterator
   14.60      ///
   14.61      /// Returns the running node (ie. the source in this case) of the
   14.62      /// iterator
   14.63      Node runningNode(const InEdgeIt &e) const {
   14.64 -      return Parent::source((Edge)e);
   14.65 +      return Parent::source(static_cast<const Edge&>(e));
   14.66      }
   14.67  
   14.68      /// Base node of the iterator
    15.1 --- a/lemon/bits/graph_adaptor_extender.h	Fri Mar 02 17:56:22 2007 +0000
    15.2 +++ b/lemon/bits/graph_adaptor_extender.h	Fri Mar 02 18:04:28 2007 +0000
    15.3 @@ -399,28 +399,28 @@
    15.4      ///
    15.5      /// Returns the base node (ie. the source in this case) of the iterator
    15.6      Node baseNode(const OutEdgeIt &e) const {
    15.7 -      return Parent::source((Edge)e);
    15.8 +      return Parent::source(static_cast<const Edge&>(e));
    15.9      }
   15.10      /// \brief Running node of the iterator
   15.11      ///
   15.12      /// Returns the running node (ie. the target in this case) of the
   15.13      /// iterator
   15.14      Node runningNode(const OutEdgeIt &e) const {
   15.15 -      return Parent::target((Edge)e);
   15.16 +      return Parent::target(static_cast<const Edge&>(e));
   15.17      }
   15.18  
   15.19      /// \brief Base node of the iterator
   15.20      ///
   15.21      /// Returns the base node (ie. the target in this case) of the iterator
   15.22      Node baseNode(const InEdgeIt &e) const {
   15.23 -      return Parent::target((Edge)e);
   15.24 +      return Parent::target(static_cast<const Edge&>(e));
   15.25      }
   15.26      /// \brief Running node of the iterator
   15.27      ///
   15.28      /// Returns the running node (ie. the source in this case) of the
   15.29      /// iterator
   15.30      Node runningNode(const InEdgeIt &e) const {
   15.31 -      return Parent::source((Edge)e);
   15.32 +      return Parent::source(static_cast<const Edge&>(e));
   15.33      }
   15.34  
   15.35      /// Base node of the iterator
   15.36 @@ -651,28 +651,28 @@
   15.37      ///
   15.38      /// Returns the base node (ie. the source in this case) of the iterator
   15.39      Node baseNode(const OutEdgeIt &e) const {
   15.40 -      return Parent::source((Edge&)e);
   15.41 +      return Parent::source(static_cast<const Edge&>(e));
   15.42      }
   15.43      /// \brief Running node of the iterator
   15.44      ///
   15.45      /// Returns the running node (ie. the target in this case) of the
   15.46      /// iterator
   15.47      Node runningNode(const OutEdgeIt &e) const {
   15.48 -      return Parent::target((Edge&)e);
   15.49 +      return Parent::target(static_cast<const Edge&>(e));
   15.50      }
   15.51    
   15.52      /// \brief Base node of the iterator
   15.53      ///
   15.54      /// Returns the base node (ie. the target in this case) of the iterator
   15.55      Node baseNode(const InEdgeIt &e) const {
   15.56 -      return Parent::target((Edge&)e);
   15.57 +      return Parent::target(static_cast<const Edge&>(e));
   15.58      }
   15.59      /// \brief Running node of the iterator
   15.60      ///
   15.61      /// Returns the running node (ie. the source in this case) of the
   15.62      /// iterator
   15.63      Node runningNode(const InEdgeIt &e) const {
   15.64 -      return Parent::source((Edge&)e);
   15.65 +      return Parent::source(static_cast<const Edge&>(e));
   15.66      }
   15.67    
   15.68      class IncEdgeIt : public Parent::UEdge { 
    16.1 --- a/lemon/bits/graph_extender.h	Fri Mar 02 17:56:22 2007 +0000
    16.2 +++ b/lemon/bits/graph_extender.h	Fri Mar 02 18:04:28 2007 +0000
    16.3 @@ -556,28 +556,28 @@
    16.4      ///
    16.5      /// Returns the base node (ie. the source in this case) of the iterator
    16.6      Node baseNode(const OutEdgeIt &e) const {
    16.7 -      return Parent::source((Edge)e);
    16.8 +      return Parent::source(static_cast<const Edge&>(e));
    16.9      }
   16.10      /// \brief Running node of the iterator
   16.11      ///
   16.12      /// Returns the running node (ie. the target in this case) of the
   16.13      /// iterator
   16.14      Node runningNode(const OutEdgeIt &e) const {
   16.15 -      return Parent::target((Edge)e);
   16.16 +      return Parent::target(static_cast<const Edge&>(e));
   16.17      }
   16.18  
   16.19      /// \brief Base node of the iterator
   16.20      ///
   16.21      /// Returns the base node (ie. the target in this case) of the iterator
   16.22      Node baseNode(const InEdgeIt &e) const {
   16.23 -      return Parent::target((Edge)e);
   16.24 +      return Parent::target(static_cast<const Edge&>(e));
   16.25      }
   16.26      /// \brief Running node of the iterator
   16.27      ///
   16.28      /// Returns the running node (ie. the source in this case) of the
   16.29      /// iterator
   16.30      Node runningNode(const InEdgeIt &e) const {
   16.31 -      return Parent::source((Edge)e);
   16.32 +      return Parent::source(static_cast<const Edge&>(e));
   16.33      }
   16.34  
   16.35      /// Base node of the iterator
   16.36 @@ -679,10 +679,10 @@
   16.37      UEdge addEdge(const Node& from, const Node& to) {
   16.38        UEdge uedge = Parent::addEdge(from, to);
   16.39        notifier(UEdge()).add(uedge);
   16.40 -      std::vector<Edge> edges;
   16.41 -      edges.push_back(Parent::direct(uedge, true));
   16.42 -      edges.push_back(Parent::direct(uedge, false));      
   16.43 -      notifier(Edge()).add(edges);
   16.44 +      std::vector<Edge> ev;
   16.45 +      ev.push_back(Parent::direct(uedge, true));
   16.46 +      ev.push_back(Parent::direct(uedge, false));      
   16.47 +      notifier(Edge()).add(ev);
   16.48        return uedge;
   16.49      }
   16.50      
   16.51 @@ -721,10 +721,10 @@
   16.52      }
   16.53  
   16.54      void erase(const UEdge& uedge) {
   16.55 -      std::vector<Edge> edges;
   16.56 -      edges.push_back(Parent::direct(uedge, true));
   16.57 -      edges.push_back(Parent::direct(uedge, false));      
   16.58 -      notifier(Edge()).erase(edges);
   16.59 +      std::vector<Edge> ev;
   16.60 +      ev.push_back(Parent::direct(uedge, true));
   16.61 +      ev.push_back(Parent::direct(uedge, false));      
   16.62 +      notifier(Edge()).erase(ev);
   16.63        notifier(UEdge()).erase(uedge);
   16.64        Parent::erase(uedge);
   16.65      }
   16.66 @@ -1007,28 +1007,28 @@
   16.67      ///
   16.68      /// Returns the base node (ie. the source in this case) of the iterator
   16.69      Node baseNode(const OutEdgeIt &e) const {
   16.70 -      return Parent::source((Edge&)e);
   16.71 +      return Parent::source(static_cast<const Edge&>(e));
   16.72      }
   16.73      /// \brief Running node of the iterator
   16.74      ///
   16.75      /// Returns the running node (ie. the target in this case) of the
   16.76      /// iterator
   16.77      Node runningNode(const OutEdgeIt &e) const {
   16.78 -      return Parent::target((Edge&)e);
   16.79 +      return Parent::target(static_cast<const Edge&>(e));
   16.80      }
   16.81    
   16.82      /// \brief Base node of the iterator
   16.83      ///
   16.84      /// Returns the base node (ie. the target in this case) of the iterator
   16.85      Node baseNode(const InEdgeIt &e) const {
   16.86 -      return Parent::target((Edge&)e);
   16.87 +      return Parent::target(static_cast<const Edge&>(e));
   16.88      }
   16.89      /// \brief Running node of the iterator
   16.90      ///
   16.91      /// Returns the running node (ie. the source in this case) of the
   16.92      /// iterator
   16.93      Node runningNode(const InEdgeIt &e) const {
   16.94 -      return Parent::source((Edge&)e);
   16.95 +      return Parent::source(static_cast<const Edge&>(e));
   16.96      }
   16.97    
   16.98      class IncEdgeIt : public Parent::UEdge { 
   16.99 @@ -1295,14 +1295,14 @@
  16.100        return node;
  16.101      }
  16.102    
  16.103 -    UEdge addEdge(const Node& source, const Node& target) {
  16.104 -      UEdge uedge = Parent::addEdge(source, target);
  16.105 +    UEdge addEdge(const Node& s, const Node& t) {
  16.106 +      UEdge uedge = Parent::addEdge(s, t);
  16.107        notifier(UEdge()).add(uedge);
  16.108      
  16.109 -      std::vector<Edge> edges;
  16.110 -      edges.push_back(Parent::direct(uedge, true));
  16.111 -      edges.push_back(Parent::direct(uedge, false));
  16.112 -      notifier(Edge()).add(edges);
  16.113 +      std::vector<Edge> ev;
  16.114 +      ev.push_back(Parent::direct(uedge, true));
  16.115 +      ev.push_back(Parent::direct(uedge, false));
  16.116 +      notifier(Edge()).add(ev);
  16.117      
  16.118        return uedge;
  16.119      }
  16.120 @@ -1351,10 +1351,10 @@
  16.121      }
  16.122      
  16.123      void erase(const UEdge& uedge) {
  16.124 -      std::vector<Edge> edges;
  16.125 -      edges.push_back(Parent::direct(uedge, true));
  16.126 -      edges.push_back(Parent::direct(uedge, false));
  16.127 -      notifier(Edge()).erase(edges);
  16.128 +      std::vector<Edge> ev;
  16.129 +      ev.push_back(Parent::direct(uedge, true));
  16.130 +      ev.push_back(Parent::direct(uedge, false));
  16.131 +      notifier(Edge()).erase(ev);
  16.132        notifier(UEdge()).erase(uedge);
  16.133        Parent::erase(uedge);
  16.134      }
    17.1 --- a/lemon/bits/item_reader.h	Fri Mar 02 17:56:22 2007 +0000
    17.2 +++ b/lemon/bits/item_reader.h	Fri Mar 02 18:04:28 2007 +0000
    17.3 @@ -594,7 +594,7 @@
    17.4            int temp;          
    17.5            if (!(is >> temp)) 
    17.6              throw DataFormatError("DefaultReader<char> format error");
    17.7 -          value = (char)temp;
    17.8 +          value = static_cast<char>(temp);
    17.9            break;
   17.10          }
   17.11        }
    18.1 --- a/lemon/bits/item_writer.h	Fri Mar 02 17:56:22 2007 +0000
    18.2 +++ b/lemon/bits/item_writer.h	Fri Mar 02 18:04:28 2007 +0000
    18.3 @@ -155,7 +155,7 @@
    18.4        os << "\"";
    18.5        if (escaped) {
    18.6  	std::ostringstream ls;
    18.7 -	for (int i = 0; i < (int)value.size(); ++i) {
    18.8 +	for (int i = 0; i < int(value.size()); ++i) {
    18.9  	  writeEscape(ls, value[i]);
   18.10  	}
   18.11  	os << ls.str();
   18.12 @@ -204,7 +204,7 @@
   18.13  	return;
   18.14        default:
   18.15  	if (c < 0x20) {
   18.16 -	  os << '\\' << std::oct << (int)c;
   18.17 +	  os << '\\' << std::oct << static_cast<int>(c);
   18.18  	} else {
   18.19  	  os << c;
   18.20  	}
    19.1 --- a/lemon/bits/lp_id.h	Fri Mar 02 17:56:22 2007 +0000
    19.2 +++ b/lemon/bits/lp_id.h	Fri Mar 02 18:04:28 2007 +0000
    19.3 @@ -77,7 +77,7 @@
    19.4            int fn = impl.index[xn];
    19.5            impl.index[xn] = impl.first_free;
    19.6            impl.first_free = xn;
    19.7 -          for(int i = fn + 1; i < (int)impl.cross.size(); ++i) {
    19.8 +          for(int i = fn + 1; i < int(impl.cross.size()); ++i) {
    19.9              impl.cross[i - 1] = impl.cross[i];
   19.10              impl.index[impl.cross[i]]--;
   19.11            }
   19.12 @@ -89,12 +89,12 @@
   19.13  
   19.14        void firstFloating(int& fn) const {
   19.15          fn = impl.first_index;
   19.16 -        if (fn == (int)impl.cross.size()) fn = -1;
   19.17 +        if (fn == int(impl.cross.size())) fn = -1;
   19.18        }
   19.19  
   19.20        void nextFloating(int& fn) const {
   19.21          ++fn;
   19.22 -        if (fn == (int)impl.cross.size()) fn = -1;
   19.23 +        if (fn == int(impl.cross.size())) fn = -1;
   19.24        }
   19.25  
   19.26        void firstFix(int& xn) const {
    20.1 --- a/lemon/bits/utility.h	Fri Mar 02 17:56:22 2007 +0000
    20.2 +++ b/lemon/bits/utility.h	Fri Mar 02 18:04:28 2007 +0000
    20.3 @@ -69,9 +69,7 @@
    20.4    };
    20.5  
    20.6  
    20.7 -  class InvalidType {
    20.8 -  private:
    20.9 -    InvalidType();
   20.10 +  struct InvalidType {
   20.11    };
   20.12  
   20.13    template <typename T>
    21.1 --- a/lemon/bits/variant.h	Fri Mar 02 17:56:22 2007 +0000
    21.2 +++ b/lemon/bits/variant.h	Fri Mar 02 18:04:28 2007 +0000
    21.3 @@ -73,18 +73,18 @@
    21.4      ///
    21.5      /// This constructor initalizes to the given value of the \c First
    21.6      /// type.
    21.7 -    BiVariant(const First& first) {
    21.8 +    BiVariant(const First& f) {
    21.9        flag = true;
   21.10 -      new(reinterpret_cast<First*>(data)) First(first);
   21.11 +      new(reinterpret_cast<First*>(data)) First(f);
   21.12      }
   21.13  
   21.14      /// \brief Constructor
   21.15      ///
   21.16      /// This constructor initalizes to the given value of the \c
   21.17      /// Second type.
   21.18 -    BiVariant(const Second& second) {
   21.19 +    BiVariant(const Second& s) {
   21.20        flag = false;
   21.21 -      new(reinterpret_cast<Second*>(data)) Second(second);
   21.22 +      new(reinterpret_cast<Second*>(data)) Second(s);
   21.23      }
   21.24  
   21.25      /// \brief Copy constructor
   21.26 @@ -121,10 +121,10 @@
   21.27      ///
   21.28      /// This function sets the variant to the given value of the \c
   21.29      /// First type.
   21.30 -    BiVariant& setFirst(const First& first) {
   21.31 +    BiVariant& setFirst(const First& f) {
   21.32        destroy();
   21.33        flag = true;
   21.34 -      new(reinterpret_cast<First*>(data)) First(first);   
   21.35 +      new(reinterpret_cast<First*>(data)) First(f);   
   21.36        return *this;
   21.37      }
   21.38  
   21.39 @@ -143,21 +143,21 @@
   21.40      ///
   21.41      /// This function sets the variant to the given value of the \c
   21.42      /// Second type.
   21.43 -    BiVariant& setSecond(const Second& second) {
   21.44 +    BiVariant& setSecond(const Second& s) {
   21.45        destroy();
   21.46        flag = false;
   21.47 -      new(reinterpret_cast<Second*>(data)) Second(second);   
   21.48 +      new(reinterpret_cast<Second*>(data)) Second(s);   
   21.49        return *this;
   21.50      }
   21.51  
   21.52      /// \brief Operator form of the \c setFirst()
   21.53 -    BiVariant& operator=(const First& first) {
   21.54 -      return setFirst(first);
   21.55 +    BiVariant& operator=(const First& f) {
   21.56 +      return setFirst(f);
   21.57      }
   21.58  
   21.59      /// \brief Operator form of the \c setSecond()
   21.60 -    BiVariant& operator=(const Second& second) {
   21.61 -      return setSecond(second);
   21.62 +    BiVariant& operator=(const Second& s) {
   21.63 +      return setSecond(s);
   21.64      }
   21.65  
   21.66      /// \brief Assign operator
    22.1 --- a/lemon/bits/vector_map.h	Fri Mar 02 17:56:22 2007 +0000
    22.2 +++ b/lemon/bits/vector_map.h	Fri Mar 02 18:04:28 2007 +0000
    22.3 @@ -134,9 +134,9 @@
    22.4      template <typename CMap>
    22.5      VectorMap& operator=(const CMap& cmap) {
    22.6        checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
    22.7 -      const typename Parent::Notifier* notifier = Parent::notifier();
    22.8 +      const typename Parent::Notifier* nf = Parent::notifier();
    22.9        Item it;
   22.10 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
   22.11 +      for (nf->first(it); it != INVALID; nf->next(it)) {
   22.12          set(it, cmap[it]);
   22.13        }
   22.14        return *this;
   22.15 @@ -176,7 +176,7 @@
   22.16      /// and it overrides the add() member function of the observer base.     
   22.17      virtual void add(const Key& key) {
   22.18        int id = Parent::notifier()->id(key);
   22.19 -      if (id >= (int)container.size()) {
   22.20 +      if (id >= int(container.size())) {
   22.21  	container.resize(id + 1);
   22.22        }
   22.23      }
   22.24 @@ -187,7 +187,7 @@
   22.25      /// and it overrides the add() member function of the observer base.     
   22.26      virtual void add(const std::vector<Key>& keys) {
   22.27        int max = container.size() - 1;
   22.28 -      for (int i = 0; i < (int)keys.size(); ++i) {
   22.29 +      for (int i = 0; i < int(keys.size()); ++i) {
   22.30          int id = Parent::notifier()->id(keys[i]);
   22.31          if (id >= max) {
   22.32            max = id;
   22.33 @@ -209,7 +209,7 @@
   22.34      /// Erase more keys from the map. It called by the observer notifier
   22.35      /// and it overrides the erase() member function of the observer base.     
   22.36      virtual void erase(const std::vector<Key>& keys) {
   22.37 -      for (int i = 0; i < (int)keys.size(); ++i) {
   22.38 +      for (int i = 0; i < int(keys.size()); ++i) {
   22.39  	container[Parent::notifier()->id(keys[i])] = Value();
   22.40        }
   22.41      }
    23.1 --- a/lemon/bpugraph_adaptor.h	Fri Mar 02 17:56:22 2007 +0000
    23.2 +++ b/lemon/bpugraph_adaptor.h	Fri Mar 02 18:04:28 2007 +0000
    23.3 @@ -127,19 +127,19 @@
    23.4      int uEdgeNum() const { return graph->uEdgeNum(); }
    23.5  
    23.6      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    23.7 -    Edge findEdge(const Node& source, const Node& target, 
    23.8 +    Edge findEdge(const Node& u, const Node& v, 
    23.9  		  const Edge& prev = INVALID) {
   23.10 -      return graph->findEdge(source, target, prev);
   23.11 +      return graph->findEdge(u, v, prev);
   23.12      }
   23.13 -    UEdge findUEdge(const Node& source, const Node& target, 
   23.14 +    UEdge findUEdge(const Node& u, const Node& v, 
   23.15                      const UEdge& prev = INVALID) {
   23.16 -      return graph->findUEdge(source, target, prev);
   23.17 +      return graph->findUEdge(u, v, prev);
   23.18      }
   23.19    
   23.20      Node addANode() const { return graph->addANode(); }
   23.21      Node addBNode() const { return graph->addBNode(); }
   23.22 -    UEdge addEdge(const Node& source, const Node& target) const { 
   23.23 -      return graph->addEdge(source, target); 
   23.24 +    UEdge addEdge(const Node& u, const Node& v) const { 
   23.25 +      return graph->addEdge(u, v); 
   23.26      }
   23.27  
   23.28      void erase(const Node& i) const { graph->erase(i); }
   23.29 @@ -156,11 +156,11 @@
   23.30      int id(const Edge& e) const { return graph->id(e); }
   23.31      int id(const UEdge& e) const { return graph->id(e); }
   23.32  
   23.33 -    Node fromNodeId(int id) const { return graph->fromNodeId(id); }
   23.34 -    ANode nodeFromANodeId(int id) const { return graph->nodeFromANodeId(id); }
   23.35 -    BNode nodeFromBNodeId(int id) const { return graph->nodeFromBNodeId(id); }
   23.36 -    Edge fromEdgeId(int id) const { return graph->fromEdgeId(id); }
   23.37 -    UEdge fromUEdgeId(int id) const { return graph->fromUEdgeId(id); }
   23.38 +    Node fromNodeId(int ix) const { return graph->fromNodeId(ix); }
   23.39 +    ANode nodeFromANodeId(int ix) const { return graph->nodeFromANodeId(ix); }
   23.40 +    BNode nodeFromBNodeId(int ix) const { return graph->nodeFromBNodeId(ix); }
   23.41 +    Edge fromEdgeId(int ix) const { return graph->fromEdgeId(ix); }
   23.42 +    UEdge fromUEdgeId(int ix) const { return graph->fromUEdgeId(ix); }
   23.43  
   23.44      int maxNodeId() const { return graph->maxNodeId(); }
   23.45      int maxANodeId() const { return graph->maxANodeId(); }
   23.46 @@ -361,8 +361,8 @@
   23.47      int id(const ANode& v) const { return Parent::id(v); }
   23.48      int id(const BNode& v) const { return Parent::id(v); }
   23.49  
   23.50 -    ANode nodeFromANodeId(int id) const { return Parent::nodeFromBNodeId(id); }
   23.51 -    BNode nodeFromBNodeId(int id) const { return Parent::nodeFromANodeId(id); }
   23.52 +    ANode nodeFromANodeId(int ix) const { return Parent::nodeFromBNodeId(ix); }
   23.53 +    BNode nodeFromBNodeId(int ix) const { return Parent::nodeFromANodeId(ix); }
   23.54  
   23.55      int maxANodeId() const { return Parent::maxBNodeId(); }
   23.56      int maxBNodeId() const { return Parent::maxANodeId(); }
    24.1 --- a/lemon/bucket_heap.h	Fri Mar 02 17:56:22 2007 +0000
    24.2 +++ b/lemon/bucket_heap.h	Fri Mar 02 18:04:28 2007 +0000
    24.3 @@ -100,7 +100,7 @@
    24.4    private:
    24.5  
    24.6      void relocate_last(int idx) {
    24.7 -      if (idx + 1 < (int)data.size()) {
    24.8 +      if (idx + 1 < int(data.size())) {
    24.9  	data[idx] = data.back();
   24.10  	if (data[idx].prev != -1) {
   24.11  	  data[data[idx].prev].next = idx;
   24.12 @@ -127,7 +127,7 @@
   24.13      }
   24.14  
   24.15      void lace(int idx) {
   24.16 -      if ((int)first.size() <= data[idx].value) {
   24.17 +      if (int(first.size()) <= data[idx].value) {
   24.18  	first.resize(data[idx].value + 1, -1);
   24.19        }
   24.20        data[idx].next = first[data[idx].value];
   24.21 @@ -354,7 +354,7 @@
   24.22    private:
   24.23  
   24.24      void relocate_last(int idx) {
   24.25 -      if (idx + 1 != (int)data.size()) {
   24.26 +      if (idx + 1 != int(data.size())) {
   24.27  	data[idx] = data.back();
   24.28  	if (data[idx].prev != -1) {
   24.29  	  data[data[idx].prev].next = idx;
   24.30 @@ -381,7 +381,7 @@
   24.31      }
   24.32  
   24.33      void lace(int idx) {
   24.34 -      if ((int)first.size() <= data[idx].value) {
   24.35 +      if (int(first.size()) <= data[idx].value) {
   24.36  	first.resize(data[idx].value + 1, -1);
   24.37        }
   24.38        data[idx].next = first[data[idx].value];
   24.39 @@ -607,7 +607,7 @@
   24.40          data[idx].item = i;
   24.41        }
   24.42        index[i] = idx;
   24.43 -      if (p >= (int)first.size()) first.resize(p + 1, -1);
   24.44 +      if (p >= int(first.size())) first.resize(p + 1, -1);
   24.45        data[idx].next = first[p];
   24.46        first[p] = idx;
   24.47        if (p < minimal) {
   24.48 @@ -750,7 +750,7 @@
   24.49          data[idx].item = i;
   24.50        }
   24.51        index[i] = idx;
   24.52 -      if (p >= (int)first.size()) first.resize(p + 1, -1);
   24.53 +      if (p >= int(first.size())) first.resize(p + 1, -1);
   24.54        data[idx].next = first[p];
   24.55        first[p] = idx;
   24.56        if (p > maximal) {
    25.1 --- a/lemon/csp.h	Fri Mar 02 17:56:22 2007 +0000
    25.2 +++ b/lemon/csp.h	Fri Mar 02 18:04:28 2007 +0000
    25.3 @@ -88,9 +88,9 @@
    25.4      
    25.5      ///\e
    25.6      ///
    25.7 -    ConstrainedShortestPath(Graph &g, CM &cost, DM &delay)
    25.8 -      : _g(g), _cost(cost), _delay(delay),
    25.9 -	_co_map(cost,delay), _dij(_g,_co_map) {}
   25.10 +    ConstrainedShortestPath(Graph &g, CM &ct, DM &dl)
   25.11 +      : _g(g), _cost(ct), _delay(dl),
   25.12 +	_co_map(ct,dl), _dij(_g,_co_map) {}
   25.13      
   25.14  
   25.15      ///Compute the cost of a path
    26.1 --- a/lemon/dfs.h	Fri Mar 02 17:56:22 2007 +0000
    26.2 +++ b/lemon/dfs.h	Fri Mar 02 18:04:28 2007 +0000
    26.3 @@ -858,8 +858,8 @@
    26.4      /// \param g is the initial value of  \ref _g
    26.5      /// \param s is the initial value of  \ref _source
    26.6      DfsWizardBase(const GR &g, Node s=INVALID) :
    26.7 -      _g((void *)&g), _reached(0), _processed(0), _pred(0),
    26.8 -      _dist(0), _source(s) {}
    26.9 +      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))), 
   26.10 +      _reached(0), _processed(0), _pred(0), _dist(0), _source(s) {}
   26.11  
   26.12    };
   26.13    
   26.14 @@ -933,11 +933,15 @@
   26.15      void run()
   26.16      {
   26.17        if(Base::_source==INVALID) throw UninitializedParameter();
   26.18 -      Dfs<Graph,TR> alg(*(Graph*)Base::_g);
   26.19 -      if(Base::_reached) alg.reachedMap(*(ReachedMap*)Base::_reached);
   26.20 -      if(Base::_processed) alg.processedMap(*(ProcessedMap*)Base::_processed);
   26.21 -      if(Base::_pred) alg.predMap(*(PredMap*)Base::_pred);
   26.22 -      if(Base::_dist) alg.distMap(*(DistMap*)Base::_dist);
   26.23 +      Dfs<Graph,TR> alg(*reinterpret_cast<const Graph*>(Base::_g));
   26.24 +      if(Base::_reached) 
   26.25 +        alg.reachedMap(*reinterpret_cast<ReachedMap*>(Base::_reached));
   26.26 +      if(Base::_processed) 
   26.27 +        alg.processedMap(*reinterpret_cast<ProcessedMap*>(Base::_processed));
   26.28 +      if(Base::_pred) 
   26.29 +        alg.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
   26.30 +      if(Base::_dist) 
   26.31 +        alg.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
   26.32        alg.run(Base::_source);
   26.33      }
   26.34  
   26.35 @@ -967,7 +971,7 @@
   26.36      template<class T>
   26.37      DfsWizard<DefPredMapBase<T> > predMap(const T &t) 
   26.38      {
   26.39 -      Base::_pred=(void *)&t;
   26.40 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   26.41        return DfsWizard<DefPredMapBase<T> >(*this);
   26.42      }
   26.43      
   26.44 @@ -988,7 +992,7 @@
   26.45      template<class T>
   26.46      DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t) 
   26.47      {
   26.48 -      Base::_pred=(void *)&t;
   26.49 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   26.50        return DfsWizard<DefReachedMapBase<T> >(*this);
   26.51      }
   26.52      
   26.53 @@ -1009,7 +1013,7 @@
   26.54      template<class T>
   26.55      DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t) 
   26.56      {
   26.57 -      Base::_pred=(void *)&t;
   26.58 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   26.59        return DfsWizard<DefProcessedMapBase<T> >(*this);
   26.60      }
   26.61      
   26.62 @@ -1029,7 +1033,7 @@
   26.63      template<class T>
   26.64      DfsWizard<DefDistMapBase<T> > distMap(const T &t) 
   26.65      {
   26.66 -      Base::_dist=(void *)&t;
   26.67 +      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   26.68        return DfsWizard<DefDistMapBase<T> >(*this);
   26.69      }
   26.70      
    27.1 --- a/lemon/dijkstra.h	Fri Mar 02 17:56:22 2007 +0000
    27.2 +++ b/lemon/dijkstra.h	Fri Mar 02 18:04:28 2007 +0000
    27.3 @@ -487,18 +487,18 @@
    27.4      ///it will allocate one. The destuctor deallocates this
    27.5      ///automatically allocated heap and cross reference, of course.
    27.6      ///\return <tt> (*this) </tt>
    27.7 -    Dijkstra &heap(Heap& heap, HeapCrossRef &crossRef)
    27.8 +    Dijkstra &heap(Heap& hp, HeapCrossRef &cr)
    27.9      {
   27.10        if(local_heap_cross_ref) {
   27.11  	delete _heap_cross_ref;
   27.12  	local_heap_cross_ref=false;
   27.13        }
   27.14 -      _heap_cross_ref = &crossRef;
   27.15 +      _heap_cross_ref = &cr;
   27.16        if(local_heap) {
   27.17  	delete _heap;
   27.18  	local_heap=false;
   27.19        }
   27.20 -      _heap = &heap;
   27.21 +      _heap = &hp;
   27.22        return *this;
   27.23      }
   27.24  
   27.25 @@ -962,8 +962,9 @@
   27.26      /// \param l is the initial value of  \ref _length
   27.27      /// \param s is the initial value of  \ref _source
   27.28      DijkstraWizardBase(const GR &g,const LM &l, Node s=INVALID) :
   27.29 -      _g((void *)&g), _length((void *)&l), _pred(0),
   27.30 -      _dist(0), _source(s) {}
   27.31 +      _g(reinterpret_cast<void*>(const_cast<GR*>(&g))), 
   27.32 +      _length(reinterpret_cast<void*>(const_cast<LM*>(&l))), 
   27.33 +      _pred(0), _dist(0), _source(s) {}
   27.34  
   27.35    };
   27.36    
   27.37 @@ -1037,9 +1038,10 @@
   27.38      {
   27.39        if(Base::_source==INVALID) throw UninitializedParameter();
   27.40        Dijkstra<Graph,LengthMap,TR> 
   27.41 -	dij(*(Graph*)Base::_g,*(LengthMap*)Base::_length);
   27.42 -      if(Base::_pred) dij.predMap(*(PredMap*)Base::_pred);
   27.43 -      if(Base::_dist) dij.distMap(*(DistMap*)Base::_dist);
   27.44 +	dij(*reinterpret_cast<const Graph*>(Base::_g),
   27.45 +            *reinterpret_cast<const LengthMap*>(Base::_length));
   27.46 +      if(Base::_pred) dij.predMap(*reinterpret_cast<PredMap*>(Base::_pred));
   27.47 +      if(Base::_dist) dij.distMap(*reinterpret_cast<DistMap*>(Base::_dist));
   27.48        dij.run(Base::_source);
   27.49      }
   27.50  
   27.51 @@ -1069,7 +1071,7 @@
   27.52      template<class T>
   27.53      DijkstraWizard<DefPredMapBase<T> > predMap(const T &t) 
   27.54      {
   27.55 -      Base::_pred=(void *)&t;
   27.56 +      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   27.57        return DijkstraWizard<DefPredMapBase<T> >(*this);
   27.58      }
   27.59      
   27.60 @@ -1089,7 +1091,7 @@
   27.61      template<class T>
   27.62      DijkstraWizard<DefDistMapBase<T> > distMap(const T &t) 
   27.63      {
   27.64 -      Base::_dist=(void *)&t;
   27.65 +      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   27.66        return DijkstraWizard<DefDistMapBase<T> >(*this);
   27.67      }
   27.68      
    28.1 --- a/lemon/edge_set.h	Fri Mar 02 17:56:22 2007 +0000
    28.2 +++ b/lemon/edge_set.h	Fri Mar 02 18:04:28 2007 +0000
    28.3 @@ -86,7 +86,7 @@
    28.4  
    28.5      ListEdgeSetBase() : first_edge(-1), first_free_edge(-1) {} 
    28.6  
    28.7 -    Edge addEdge(const Node& source, const Node& target) {
    28.8 +    Edge addEdge(const Node& u, const Node& v) {
    28.9        int n;
   28.10        if (first_free_edge == -1) {
   28.11  	n = edges.size();
   28.12 @@ -95,18 +95,18 @@
   28.13  	n = first_free_edge;
   28.14  	first_free_edge = edges[first_free_edge].next_in;
   28.15        }
   28.16 -      edges[n].next_in = (*nodes)[target].first_in;
   28.17 -      if ((*nodes)[target].first_in != -1) {
   28.18 -        edges[(*nodes)[target].first_in].prev_in = n;
   28.19 +      edges[n].next_in = (*nodes)[v].first_in;
   28.20 +      if ((*nodes)[v].first_in != -1) {
   28.21 +        edges[(*nodes)[v].first_in].prev_in = n;
   28.22        }
   28.23 -      (*nodes)[target].first_in = n;
   28.24 -      edges[n].next_out = (*nodes)[source].first_out;
   28.25 -      if ((*nodes)[source].first_out != -1) {
   28.26 -        edges[(*nodes)[source].first_out].prev_out = n;
   28.27 +      (*nodes)[v].first_in = n;
   28.28 +      edges[n].next_out = (*nodes)[u].first_out;
   28.29 +      if ((*nodes)[u].first_out != -1) {
   28.30 +        edges[(*nodes)[u].first_out].prev_out = n;
   28.31        }
   28.32 -      (*nodes)[source].first_out = n;
   28.33 -      edges[n].source = source;
   28.34 -      edges[n].target = target;
   28.35 +      (*nodes)[u].first_out = n;
   28.36 +      edges[n].source = u;
   28.37 +      edges[n].target = v;
   28.38        return Edge(n);
   28.39      }
   28.40  
   28.41 @@ -188,8 +188,8 @@
   28.42      int id(const Node& node) const { return graph->id(node); }
   28.43      int id(const Edge& edge) const { return edge.id; }
   28.44  
   28.45 -    Node nodeFromId(int id) const { return graph->nodeFromId(id); }
   28.46 -    Edge edgeFromId(int id) const { return Edge(id); }
   28.47 +    Node nodeFromId(int ix) const { return graph->nodeFromId(ix); }
   28.48 +    Edge edgeFromId(int ix) const { return Edge(ix); }
   28.49  
   28.50      int maxNodeId() const { return graph->maxNodeId(); };
   28.51      int maxEdgeId() const { return edges.size() - 1; }
   28.52 @@ -293,7 +293,7 @@
   28.53  	Parent::erase(node);
   28.54        }
   28.55        virtual void erase(const std::vector<Node>& nodes) {
   28.56 -        for (int i = 0; i < (int)nodes.size(); ++i) {
   28.57 +        for (int i = 0; i < int(nodes.size()); ++i) {
   28.58            _edgeset.eraseNode(nodes[i]);
   28.59          }
   28.60  	Parent::erase(nodes);
   28.61 @@ -382,7 +382,7 @@
   28.62  	Parent::erase(node);
   28.63        }
   28.64        virtual void erase(const std::vector<Node>& nodes) {
   28.65 -	for (int i = 0; i < (int)nodes.size(); ++i) {
   28.66 +	for (int i = 0; i < int(nodes.size()); ++i) {
   28.67  	  _edgeset.eraseNode(nodes[i]);
   28.68  	}
   28.69  	Parent::erase(nodes);
   28.70 @@ -460,15 +460,15 @@
   28.71  
   28.72      SmartEdgeSetBase() {} 
   28.73  
   28.74 -    Edge addEdge(const Node& source, const Node& target) {
   28.75 +    Edge addEdge(const Node& u, const Node& v) {
   28.76        int n = edges.size();
   28.77        edges.push_back(EdgeT());
   28.78 -      edges[n].next_in = (*nodes)[target].first_in;
   28.79 -      (*nodes)[target].first_in = n;
   28.80 -      edges[n].next_out = (*nodes)[source].first_out;
   28.81 -      (*nodes)[source].first_out = n;
   28.82 -      edges[n].source = source;
   28.83 -      edges[n].target = target;
   28.84 +      edges[n].next_in = (*nodes)[v].first_in;
   28.85 +      (*nodes)[v].first_in = n;
   28.86 +      edges[n].next_out = (*nodes)[u].first_out;
   28.87 +      (*nodes)[u].first_out = n;
   28.88 +      edges[n].source = u;
   28.89 +      edges[n].target = v;
   28.90        return Edge(n);
   28.91      }
   28.92  
   28.93 @@ -516,8 +516,8 @@
   28.94      int id(const Node& node) const { return graph->id(node); }
   28.95      int id(const Edge& edge) const { return edge.id; }
   28.96  
   28.97 -    Node nodeFromId(int id) const { return graph->nodeFromId(id); }
   28.98 -    Edge edgeFromId(int id) const { return Edge(id); }
   28.99 +    Node nodeFromId(int ix) const { return graph->nodeFromId(ix); }
  28.100 +    Edge edgeFromId(int ix) const { return Edge(ix); }
  28.101  
  28.102      int maxNodeId() const { return graph->maxNodeId(); };
  28.103      int maxEdgeId() const { return edges.size() - 1; }
  28.104 @@ -626,7 +626,7 @@
  28.105        }
  28.106        virtual void erase(const std::vector<Node>& nodes) {
  28.107          try {
  28.108 -          for (int i = 0; i < (int)nodes.size(); ++i) {
  28.109 +          for (int i = 0; i < int(nodes.size()); ++i) {
  28.110              _edgeset.eraseNode(nodes[i]);
  28.111            }
  28.112            Parent::erase(nodes);
  28.113 @@ -731,7 +731,7 @@
  28.114        }
  28.115        virtual void erase(const std::vector<Node>& nodes) {
  28.116          try {
  28.117 -          for (int i = 0; i < (int)nodes.size(); ++i) {
  28.118 +          for (int i = 0; i < int(nodes.size()); ++i) {
  28.119              _edgeset.eraseNode(nodes[i]);
  28.120            }
  28.121            Parent::erase(nodes);
    29.1 --- a/lemon/error.h	Fri Mar 02 17:56:22 2007 +0000
    29.2 +++ b/lemon/error.h	Fri Mar 02 18:04:28 2007 +0000
    29.3 @@ -126,15 +126,15 @@
    29.4      ErrorMessage(const ErrorMessage& em) throw() : buf(em.buf) { }
    29.5  
    29.6      ///\e 
    29.7 -    ErrorMessage(const char *message) throw() {
    29.8 +    ErrorMessage(const char *msg) throw() {
    29.9        init();
   29.10 -      *this << message;
   29.11 +      *this << msg;
   29.12      }
   29.13  
   29.14      ///\e 
   29.15 -    ErrorMessage(const std::string &message) throw() {
   29.16 +    ErrorMessage(const std::string &msg) throw() {
   29.17        init();
   29.18 -      *this << message;
   29.19 +      *this << msg;
   29.20      }
   29.21  
   29.22      ///\e 
   29.23 @@ -266,11 +266,11 @@
   29.24        : _message(the_message), _line(line_num) { file(file_name); }
   29.25  
   29.26      ///\e 
   29.27 -    void line(int line) { _line = line; }
   29.28 +    void line(int ln) { _line = ln; }
   29.29      ///\e 
   29.30 -    void message(const std::string& message) { _message.set(message); }
   29.31 +    void message(const std::string& msg) { _message.set(msg); }
   29.32      ///\e 
   29.33 -    void file(const std::string &file) { _file.set(file); }
   29.34 +    void file(const std::string &fl) { _file.set(fl); }
   29.35   
   29.36      ///\e
   29.37      int line() const { return _line; }
   29.38 @@ -329,12 +329,12 @@
   29.39        IoError(foe), _file(foe._file) {}
   29.40  
   29.41      ///\e 
   29.42 -    explicit FileOpenError(const std::string& file)
   29.43 -      : _file(file) {}
   29.44 +    explicit FileOpenError(const std::string& fl)
   29.45 +      : _file(fl) {}
   29.46  
   29.47  
   29.48      ///\e 
   29.49 -    void file(const std::string &file) { _file.set(file); }
   29.50 +    void file(const std::string &fl) { _file.set(fl); }
   29.51   
   29.52      /// \brief Returns the filename.
   29.53      ///
   29.54 @@ -382,9 +382,9 @@
   29.55        : _message(the_message), _file(file_name) {}
   29.56  
   29.57       ///\e 
   29.58 -    void message(const std::string& message) { _message.set(message); }
   29.59 +    void message(const std::string& msg) { _message.set(msg); }
   29.60      ///\e 
   29.61 -    void file(const std::string &file) { _file.set(file); }
   29.62 +    void file(const std::string &fl) { _file.set(fl); }
   29.63   
   29.64       ///\e
   29.65      const char* message() const { 
    30.1 --- a/lemon/full_graph.h	Fri Mar 02 17:56:22 2007 +0000
    30.2 +++ b/lemon/full_graph.h	Fri Mar 02 18:04:28 2007 +0000
    30.3 @@ -56,7 +56,7 @@
    30.4      typedef True NodeNumTag;
    30.5      typedef True EdgeNumTag;
    30.6  
    30.7 -    Node operator()(int index) const { return Node(index); }
    30.8 +    Node operator()(int ix) const { return Node(ix); }
    30.9      int index(const Node& node) const { return node.id; }
   30.10  
   30.11      Edge edge(const Node& u, const Node& v) const { 
   30.12 @@ -129,30 +129,30 @@
   30.13        --node.id;
   30.14      }
   30.15  
   30.16 -    void first(Edge& edge) const {
   30.17 -      edge.id = _edgeNum-1;
   30.18 +    void first(Edge& e) const {
   30.19 +      e.id = _edgeNum-1;
   30.20      }
   30.21  
   30.22 -    static void next(Edge& edge) {
   30.23 -      --edge.id;
   30.24 +    static void next(Edge& e) {
   30.25 +      --e.id;
   30.26      }
   30.27  
   30.28 -    void firstOut(Edge& edge, const Node& node) const {
   30.29 -      edge.id = _edgeNum + node.id - _nodeNum;
   30.30 +    void firstOut(Edge& e, const Node& n) const {
   30.31 +      e.id = _edgeNum + n.id - _nodeNum;
   30.32      }
   30.33  
   30.34 -    void nextOut(Edge& edge) const {
   30.35 -      edge.id -= _nodeNum;
   30.36 -      if (edge.id < 0) edge.id = -1;
   30.37 +    void nextOut(Edge& e) const {
   30.38 +      e.id -= _nodeNum;
   30.39 +      if (e.id < 0) e.id = -1;
   30.40      }
   30.41  
   30.42 -    void firstIn(Edge& edge, const Node& node) const {
   30.43 -      edge.id = node.id * _nodeNum;
   30.44 +    void firstIn(Edge& e, const Node& n) const {
   30.45 +      e.id = n.id * _nodeNum;
   30.46      }
   30.47      
   30.48 -    void nextIn(Edge& edge) const {
   30.49 -      ++edge.id;
   30.50 -      if (edge.id % _nodeNum == 0) edge.id = -1;
   30.51 +    void nextIn(Edge& e) const {
   30.52 +      ++e.id;
   30.53 +      if (e.id % _nodeNum == 0) e.id = -1;
   30.54      }
   30.55  
   30.56    };
   30.57 @@ -207,7 +207,7 @@
   30.58      /// static size graph the node's of the graph can be indiced
   30.59      /// by the range from 0 to \e nodeNum()-1 and the index of
   30.60      /// the node can accessed by the \e index() member.
   30.61 -    Node operator()(int index) const { return Parent::operator()(index); }
   30.62 +    Node operator()(int ix) const { return Parent::operator()(ix); }
   30.63  
   30.64      /// \brief Returns the index of the node.
   30.65      ///
   30.66 @@ -250,7 +250,7 @@
   30.67    public:
   30.68  
   30.69  
   30.70 -    Node operator()(int index) const { return Node(index); }
   30.71 +    Node operator()(int ix) const { return Node(ix); }
   30.72      int index(const Node& node) const { return node.id; }
   30.73  
   30.74      Edge edge(const Node& u, const Node& v) const { 
   30.75 @@ -271,12 +271,12 @@
   30.76  
   30.77      Node source(Edge e) const { 
   30.78        /// \todo we may do it faster
   30.79 -      return Node(((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2);
   30.80 +      return Node((int(sqrt(double(1 + 8 * e.id)) + 1)) / 2);
   30.81      }
   30.82  
   30.83      Node target(Edge e) const { 
   30.84 -      int source = ((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2;;
   30.85 -      return Node(e.id - (source) * (source - 1) / 2);
   30.86 +      int s = (int(sqrt(double(1 + 8 * e.id)) + 1)) / 2;
   30.87 +      return Node(e.id - s * (s - 1) / 2);
   30.88      }
   30.89  
   30.90      static int id(Node v) { return v.id; }
   30.91 @@ -322,47 +322,47 @@
   30.92        bool operator<(const Edge edge) const {return id < edge.id;}
   30.93      };
   30.94  
   30.95 -    void first(Node& node) const {
   30.96 -      node.id = _nodeNum - 1;
   30.97 +    void first(Node& n) const {
   30.98 +      n.id = _nodeNum - 1;
   30.99      }
  30.100  
  30.101 -    static void next(Node& node) {
  30.102 -      --node.id;
  30.103 +    static void next(Node& n) {
  30.104 +      --n.id;
  30.105      }
  30.106  
  30.107 -    void first(Edge& edge) const {
  30.108 -      edge.id = _edgeNum - 1;
  30.109 +    void first(Edge& e) const {
  30.110 +      e.id = _edgeNum - 1;
  30.111      }
  30.112  
  30.113 -    static void next(Edge& edge) {
  30.114 -      --edge.id;
  30.115 +    static void next(Edge& e) {
  30.116 +      --e.id;
  30.117      }
  30.118  
  30.119 -    void firstOut(Edge& edge, const Node& node) const {      
  30.120 -      int src = node.id;
  30.121 +    void firstOut(Edge& e, const Node& n) const {      
  30.122 +      int src = n.id;
  30.123        int trg = 0;
  30.124 -      edge.id = (trg < src ? src * (src - 1) / 2 + trg : -1);
  30.125 +      e.id = (trg < src ? src * (src - 1) / 2 + trg : -1);
  30.126      }
  30.127  
  30.128      /// \todo with specialized iterators we can make faster iterating
  30.129 -    void nextOut(Edge& edge) const {
  30.130 -      int src = source(edge).id;
  30.131 -      int trg = target(edge).id;
  30.132 +    void nextOut(Edge& e) const {
  30.133 +      int src = source(e).id;
  30.134 +      int trg = target(e).id;
  30.135        ++trg;
  30.136 -      edge.id = (trg < src ? src * (src - 1) / 2 + trg : -1);
  30.137 +      e.id = (trg < src ? src * (src - 1) / 2 + trg : -1);
  30.138      }
  30.139  
  30.140 -    void firstIn(Edge& edge, const Node& node) const {
  30.141 -      int src = node.id + 1;
  30.142 -      int trg = node.id;
  30.143 -      edge.id = (src < _nodeNum ? src * (src - 1) / 2 + trg : -1);
  30.144 +    void firstIn(Edge& e, const Node& n) const {
  30.145 +      int src = n.id + 1;
  30.146 +      int trg = n.id;
  30.147 +      e.id = (src < _nodeNum ? src * (src - 1) / 2 + trg : -1);
  30.148      }
  30.149      
  30.150 -    void nextIn(Edge& edge) const {
  30.151 -      int src = source(edge).id;
  30.152 -      int trg = target(edge).id;
  30.153 +    void nextIn(Edge& e) const {
  30.154 +      int src = source(e).id;
  30.155 +      int trg = target(e).id;
  30.156        ++src;
  30.157 -      edge.id = (src < _nodeNum ? src * (src - 1) / 2 + trg : -1);
  30.158 +      e.id = (src < _nodeNum ? src * (src - 1) / 2 + trg : -1);
  30.159      }
  30.160  
  30.161    };
  30.162 @@ -421,7 +421,7 @@
  30.163      /// static size graph the node's of the graph can be indiced
  30.164      /// by the range from 0 to \e nodeNum()-1 and the index of
  30.165      /// the node can accessed by the \e index() member.
  30.166 -    Node operator()(int index) const { return Parent::operator()(index); }
  30.167 +    Node operator()(int ix) const { return Parent::operator()(ix); }
  30.168  
  30.169      /// \brief Returns the index of the node.
  30.170      ///
  30.171 @@ -478,10 +478,10 @@
  30.172  
  30.173      FullBpUGraphBase() {}
  30.174  
  30.175 -    void construct(int aNodeNum, int bNodeNum) {
  30.176 -      _aNodeNum = aNodeNum;
  30.177 -      _bNodeNum = bNodeNum;
  30.178 -      _edgeNum = aNodeNum * bNodeNum;
  30.179 +    void construct(int ann, int bnn) {
  30.180 +      _aNodeNum = ann;
  30.181 +      _bNodeNum = bnn;
  30.182 +      _edgeNum = ann * bnn;
  30.183      }
  30.184  
  30.185    public:
  30.186 @@ -521,8 +521,8 @@
  30.187        bool operator<(const UEdge i) const {return id<i.id;}
  30.188      };
  30.189  
  30.190 -    Node aNode(int index) const { return Node(index << 1); }
  30.191 -    Node bNode(int index) const { return Node((index << 1) + 1); }
  30.192 +    Node aNode(int ix) const { return Node(ix << 1); }
  30.193 +    Node bNode(int ix) const { return Node((ix << 1) + 1); }
  30.194  
  30.195      int aNodeIndex(const Node& node) const { return node.id >> 1; }
  30.196      int bNodeIndex(const Node& node) const { return node.id >> 1; }
  30.197 @@ -695,8 +695,8 @@
  30.198        Parent::construct(0, 0);
  30.199      }
  30.200  
  30.201 -    FullBpUGraph(int aNodeNum, int bNodeNum) {
  30.202 -      Parent::construct(aNodeNum, bNodeNum);
  30.203 +    FullBpUGraph(int ann, int bnn) {
  30.204 +      Parent::construct(ann, bnn);
  30.205      }
  30.206  
  30.207      /// \brief Resize the graph
  30.208 @@ -737,7 +737,7 @@
  30.209      /// static size graph the node's of the graph can be indiced
  30.210      /// by the range from 0 to \e aNodeNum()-1 and the index of
  30.211      /// the node can accessed by the \e aNodeIndex() member.
  30.212 -    Node aNode(int index) const { return Parent::aNode(index); }
  30.213 +    Node aNode(int ix) const { return Parent::aNode(ix); }
  30.214  
  30.215      /// \brief Returns the B-node with the given index.
  30.216      ///
  30.217 @@ -745,7 +745,7 @@
  30.218      /// static size graph the node's of the graph can be indiced
  30.219      /// by the range from 0 to \e bNodeNum()-1 and the index of
  30.220      /// the node can accessed by the \e bNodeIndex() member.
  30.221 -    Node bNode(int index) const { return Parent::bNode(index); }
  30.222 +    Node bNode(int ix) const { return Parent::bNode(ix); }
  30.223  
  30.224      /// \brief Returns the index of the A-node.
  30.225      ///
    31.1 --- a/lemon/graph_adaptor.h	Fri Mar 02 17:56:22 2007 +0000
    31.2 +++ b/lemon/graph_adaptor.h	Fri Mar 02 18:04:28 2007 +0000
    31.3 @@ -93,17 +93,17 @@
    31.4      int edgeNum() const { return graph->edgeNum(); }
    31.5  
    31.6      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    31.7 -    Edge findEdge(const Node& source, const Node& target, 
    31.8 +    Edge findEdge(const Node& u, const Node& v, 
    31.9  		  const Edge& prev = INVALID) {
   31.10 -      return graph->findEdge(source, target, prev);
   31.11 +      return graph->findEdge(u, v, prev);
   31.12      }
   31.13    
   31.14      Node addNode() const { 
   31.15        return Node(graph->addNode()); 
   31.16      }
   31.17  
   31.18 -    Edge addEdge(const Node& source, const Node& target) const { 
   31.19 -      return Edge(graph->addEdge(source, target)); 
   31.20 +    Edge addEdge(const Node& u, const Node& v) const { 
   31.21 +      return Edge(graph->addEdge(u, v)); 
   31.22      }
   31.23  
   31.24      void erase(const Node& i) const { graph->erase(i); }
   31.25 @@ -114,12 +114,12 @@
   31.26      int id(const Node& v) const { return graph->id(v); }
   31.27      int id(const Edge& e) const { return graph->id(e); }
   31.28  
   31.29 -    Node fromNodeId(int id) const {
   31.30 -      return graph->fromNodeId(id);
   31.31 +    Node fromNodeId(int ix) const {
   31.32 +      return graph->fromNodeId(ix);
   31.33      }
   31.34  
   31.35 -    Edge fromEdgeId(int id) const {
   31.36 -      return graph->fromEdgeId(id);
   31.37 +    Edge fromEdgeId(int ix) const {
   31.38 +      return graph->fromEdgeId(ix);
   31.39      }
   31.40  
   31.41      int maxNodeId() const {
   31.42 @@ -243,9 +243,9 @@
   31.43      Node target(const Edge& e) const { return Parent::source(e); }
   31.44  
   31.45      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
   31.46 -    Edge findEdge(const Node& source, const Node& target, 
   31.47 +    Edge findEdge(const Node& u, const Node& v, 
   31.48  		  const Edge& prev = INVALID) {
   31.49 -      return Parent::findEdge(target, source, prev);
   31.50 +      return Parent::findEdge(v, u, prev);
   31.51      }
   31.52  
   31.53    };
   31.54 @@ -460,10 +460,10 @@
   31.55        typedef SubMapExtender<Adaptor, typename Parent::
   31.56                               template NodeMap<_Value> > Parent;
   31.57      
   31.58 -      NodeMap(const Graph& graph) 
   31.59 -	: Parent(graph) {}
   31.60 -      NodeMap(const Graph& graph, const _Value& value) 
   31.61 -	: Parent(graph, value) {}
   31.62 +      NodeMap(const Graph& g) 
   31.63 +	: Parent(g) {}
   31.64 +      NodeMap(const Graph& g, const _Value& v) 
   31.65 +	: Parent(g, v) {}
   31.66      
   31.67        NodeMap& operator=(const NodeMap& cmap) {
   31.68  	return operator=<NodeMap>(cmap);
   31.69 @@ -486,10 +486,10 @@
   31.70        typedef SubMapExtender<Adaptor, typename Parent::
   31.71                               template EdgeMap<_Value> > Parent;
   31.72      
   31.73 -      EdgeMap(const Graph& graph) 
   31.74 -	: Parent(graph) {}
   31.75 -      EdgeMap(const Graph& graph, const _Value& value) 
   31.76 -	: Parent(graph, value) {}
   31.77 +      EdgeMap(const Graph& g) 
   31.78 +	: Parent(g) {}
   31.79 +      EdgeMap(const Graph& g, const _Value& v) 
   31.80 +	: Parent(g, v) {}
   31.81      
   31.82        EdgeMap& operator=(const EdgeMap& cmap) {
   31.83  	return operator=<EdgeMap>(cmap);
   31.84 @@ -633,10 +633,10 @@
   31.85        typedef SubMapExtender<Adaptor, typename Parent::
   31.86                               template NodeMap<_Value> > Parent;
   31.87      
   31.88 -      NodeMap(const Graph& graph) 
   31.89 -	: Parent(graph) {}
   31.90 -      NodeMap(const Graph& graph, const _Value& value) 
   31.91 -	: Parent(graph, value) {}
   31.92 +      NodeMap(const Graph& g) 
   31.93 +	: Parent(g) {}
   31.94 +      NodeMap(const Graph& g, const _Value& v) 
   31.95 +	: Parent(g, v) {}
   31.96      
   31.97        NodeMap& operator=(const NodeMap& cmap) {
   31.98  	return operator=<NodeMap>(cmap);
   31.99 @@ -659,10 +659,10 @@
  31.100        typedef SubMapExtender<Adaptor, typename Parent::
  31.101                               template EdgeMap<_Value> > Parent;
  31.102      
  31.103 -      EdgeMap(const Graph& graph) 
  31.104 -	: Parent(graph) {}
  31.105 -      EdgeMap(const Graph& graph, const _Value& value) 
  31.106 -	: Parent(graph, value) {}
  31.107 +      EdgeMap(const Graph& g) 
  31.108 +	: Parent(g) {}
  31.109 +      EdgeMap(const Graph& g, const _Value& v) 
  31.110 +	: Parent(g, v) {}
  31.111      
  31.112        EdgeMap& operator=(const EdgeMap& cmap) {
  31.113  	return operator=<EdgeMap>(cmap);
  31.114 @@ -1105,10 +1105,10 @@
  31.115        typedef Adaptor Graph;
  31.116        typedef SubMapExtender<Adaptor, EdgeMapBase<_Value> > Parent;
  31.117      
  31.118 -      EdgeMap(const Graph& graph) 
  31.119 -	: Parent(graph) {}
  31.120 -      EdgeMap(const Graph& graph, const _Value& value) 
  31.121 -	: Parent(graph, value) {}
  31.122 +      EdgeMap(const Graph& g) 
  31.123 +	: Parent(g) {}
  31.124 +      EdgeMap(const Graph& g, const _Value& v) 
  31.125 +	: Parent(g, v) {}
  31.126      
  31.127        EdgeMap& operator=(const EdgeMap& cmap) {
  31.128  	return operator=<EdgeMap>(cmap);
  31.129 @@ -1180,9 +1180,9 @@
  31.130      AlterableUndirGraphAdaptor() 
  31.131        : Parent(), edge_notifier(*this), edge_notifier_proxy(*this) {}
  31.132  
  31.133 -    void setGraph(_Graph& graph) {
  31.134 -      Parent::setGraph(graph);
  31.135 -      edge_notifier_proxy.setNotifier(graph.notifier(GraphEdge()));
  31.136 +    void setGraph(_Graph& g) {
  31.137 +      Parent::setGraph(g);
  31.138 +      edge_notifier_proxy.setNotifier(g.notifier(GraphEdge()));
  31.139      }
  31.140  
  31.141    public:
  31.142 @@ -1220,8 +1220,8 @@
  31.143          }
  31.144        }
  31.145  
  31.146 -      void setNotifier(typename Graph::EdgeNotifier& notifier) {
  31.147 -        Parent::attach(notifier);
  31.148 +      void setNotifier(typename Graph::EdgeNotifier& nf) {
  31.149 +        Parent::attach(nf);
  31.150        }
  31.151  
  31.152        
  31.153 @@ -1235,7 +1235,7 @@
  31.154        }
  31.155        virtual void add(const std::vector<GraphEdge>& ge) {
  31.156          std::vector<Edge> edges;
  31.157 -        for (int i = 0; i < (int)ge.size(); ++i) { 
  31.158 +        for (int i = 0; i < int(ge.size()); ++i) { 
  31.159            edges.push_back(AdaptorBase::Parent::direct(ge[i], true));
  31.160            edges.push_back(AdaptorBase::Parent::direct(ge[i], false));
  31.161          }
  31.162 @@ -1249,7 +1249,7 @@
  31.163        }
  31.164        virtual void erase(const std::vector<GraphEdge>& ge) {
  31.165          std::vector<Edge> edges;
  31.166 -        for (int i = 0; i < (int)ge.size(); ++i) { 
  31.167 +        for (int i = 0; i < int(ge.size()); ++i) { 
  31.168            edges.push_back(AdaptorBase::Parent::direct(ge[i], true));
  31.169            edges.push_back(AdaptorBase::Parent::direct(ge[i], false));
  31.170          }
  31.171 @@ -1821,113 +1821,113 @@
  31.172  
  31.173      };
  31.174  
  31.175 -    void first(Node& node) const {
  31.176 -      Parent::first(node);
  31.177 -      node.in_node = true;
  31.178 +    void first(Node& n) const {
  31.179 +      Parent::first(n);
  31.180 +      n.in_node = true;
  31.181      }
  31.182  
  31.183 -    void next(Node& node) const {
  31.184 -      if (node.in_node) {
  31.185 -	node.in_node = false;
  31.186 +    void next(Node& n) const {
  31.187 +      if (n.in_node) {
  31.188 +	n.in_node = false;
  31.189        } else {
  31.190 -	node.in_node = true;
  31.191 -	Parent::next(node);
  31.192 +	n.in_node = true;
  31.193 +	Parent::next(n);
  31.194        }
  31.195      }
  31.196  
  31.197 -    void first(Edge& edge) const {
  31.198 -      edge.item.setSecond();
  31.199 -      Parent::first(edge.item.second());
  31.200 -      if (edge.item.second() == INVALID) {
  31.201 -        edge.item.setFirst();
  31.202 -	Parent::first(edge.item.first());
  31.203 +    void first(Edge& e) const {
  31.204 +      e.item.setSecond();
  31.205 +      Parent::first(e.item.second());
  31.206 +      if (e.item.second() == INVALID) {
  31.207 +        e.item.setFirst();
  31.208 +	Parent::first(e.item.first());
  31.209        }
  31.210      }
  31.211  
  31.212 -    void next(Edge& edge) const {
  31.213 -      if (edge.item.secondState()) {
  31.214 -	Parent::next(edge.item.second());
  31.215 -        if (edge.item.second() == INVALID) {
  31.216 -          edge.item.setFirst();
  31.217 -          Parent::first(edge.item.first());
  31.218 +    void next(Edge& e) const {
  31.219 +      if (e.item.secondState()) {
  31.220 +	Parent::next(e.item.second());
  31.221 +        if (e.item.second() == INVALID) {
  31.222 +          e.item.setFirst();
  31.223 +          Parent::first(e.item.first());
  31.224          }
  31.225        } else {
  31.226 -	Parent::next(edge.item.first());
  31.227 +	Parent::next(e.item.first());
  31.228        }      
  31.229      }
  31.230  
  31.231 -    void firstOut(Edge& edge, const Node& node) const {
  31.232 -      if (node.in_node) {
  31.233 -        edge.item.setSecond(node);
  31.234 +    void firstOut(Edge& e, const Node& n) const {
  31.235 +      if (n.in_node) {
  31.236 +        e.item.setSecond(n);
  31.237        } else {
  31.238 -        edge.item.setFirst();
  31.239 -	Parent::firstOut(edge.item.first(), node);
  31.240 +        e.item.setFirst();
  31.241 +	Parent::firstOut(e.item.first(), n);
  31.242        }
  31.243      }
  31.244  
  31.245 -    void nextOut(Edge& edge) const {
  31.246 -      if (!edge.item.firstState()) {
  31.247 -	edge.item.setFirst(INVALID);
  31.248 +    void nextOut(Edge& e) const {
  31.249 +      if (!e.item.firstState()) {
  31.250 +	e.item.setFirst(INVALID);
  31.251        } else {
  31.252 -	Parent::nextOut(edge.item.first());
  31.253 +	Parent::nextOut(e.item.first());
  31.254        }      
  31.255      }
  31.256  
  31.257 -    void firstIn(Edge& edge, const Node& node) const {
  31.258 -      if (!node.in_node) {
  31.259 -        edge.item.setSecond(node);        
  31.260 +    void firstIn(Edge& e, const Node& n) const {
  31.261 +      if (!n.in_node) {
  31.262 +        e.item.setSecond(n);        
  31.263        } else {
  31.264 -        edge.item.setFirst();
  31.265 -	Parent::firstIn(edge.item.first(), node);
  31.266 +        e.item.setFirst();
  31.267 +	Parent::firstIn(e.item.first(), n);
  31.268        }
  31.269      }
  31.270  
  31.271 -    void nextIn(Edge& edge) const {
  31.272 -      if (!edge.item.firstState()) {
  31.273 -	edge.item.setFirst(INVALID);
  31.274 +    void nextIn(Edge& e) const {
  31.275 +      if (!e.item.firstState()) {
  31.276 +	e.item.setFirst(INVALID);
  31.277        } else {
  31.278 -	Parent::nextIn(edge.item.first());
  31.279 +	Parent::nextIn(e.item.first());
  31.280        }
  31.281      }
  31.282  
  31.283 -    Node source(const Edge& edge) const {
  31.284 -      if (edge.item.firstState()) {
  31.285 -	return Node(Parent::source(edge.item.first()), false);
  31.286 +    Node source(const Edge& e) const {
  31.287 +      if (e.item.firstState()) {
  31.288 +	return Node(Parent::source(e.item.first()), false);
  31.289        } else {
  31.290 -	return Node(edge.item.second(), true);
  31.291 +	return Node(e.item.second(), true);
  31.292        }
  31.293      }
  31.294  
  31.295 -    Node target(const Edge& edge) const {
  31.296 -      if (edge.item.firstState()) {
  31.297 -	return Node(Parent::target(edge.item.first()), true);
  31.298 +    Node target(const Edge& e) const {
  31.299 +      if (e.item.firstState()) {
  31.300 +	return Node(Parent::target(e.item.first()), true);
  31.301        } else {
  31.302 -	return Node(edge.item.second(), false);
  31.303 +	return Node(e.item.second(), false);
  31.304        }
  31.305      }
  31.306  
  31.307 -    int id(const Node& node) const {
  31.308 -      return (Parent::id(node) << 1) | (node.in_node ? 0 : 1);
  31.309 +    int id(const Node& n) const {
  31.310 +      return (Parent::id(n) << 1) | (n.in_node ? 0 : 1);
  31.311      }
  31.312 -    Node nodeFromId(int id) const {
  31.313 -      return Node(Parent::nodeFromId(id >> 1), (id & 1) == 0);
  31.314 +    Node nodeFromId(int ix) const {
  31.315 +      return Node(Parent::nodeFromId(ix >> 1), (ix & 1) == 0);
  31.316      }
  31.317      int maxNodeId() const {
  31.318        return 2 * Parent::maxNodeId() + 1;
  31.319      }
  31.320  
  31.321 -    int id(const Edge& edge) const {
  31.322 -      if (edge.item.firstState()) {
  31.323 -        return Parent::id(edge.item.first()) << 1;
  31.324 +    int id(const Edge& e) const {
  31.325 +      if (e.item.firstState()) {
  31.326 +        return Parent::id(e.item.first()) << 1;
  31.327        } else {
  31.328 -        return (Parent::id(edge.item.second()) << 1) | 1;
  31.329 +        return (Parent::id(e.item.second()) << 1) | 1;
  31.330        }
  31.331      }
  31.332 -    Edge edgeFromId(int id) const {
  31.333 -      if ((id & 1) == 0) {
  31.334 -        return Edge(Parent::edgeFromId(id >> 1));
  31.335 +    Edge edgeFromId(int ix) const {
  31.336 +      if ((ix & 1) == 0) {
  31.337 +        return Edge(Parent::edgeFromId(ix >> 1));
  31.338        } else {
  31.339 -        return Edge(Parent::nodeFromId(id >> 1));
  31.340 +        return Edge(Parent::nodeFromId(ix >> 1));
  31.341        }
  31.342      }
  31.343      int maxEdgeId() const {
  31.344 @@ -1938,57 +1938,57 @@
  31.345      /// \brief Returns true when the node is in-node.
  31.346      ///
  31.347      /// Returns true when the node is in-node.
  31.348 -    static bool inNode(const Node& node) {
  31.349 -      return node.in_node;
  31.350 +    static bool inNode(const Node& n) {
  31.351 +      return n.in_node;
  31.352      }
  31.353  
  31.354      /// \brief Returns true when the node is out-node.
  31.355      ///
  31.356      /// Returns true when the node is out-node.
  31.357 -    static bool outNode(const Node& node) {
  31.358 -      return !node.in_node;
  31.359 +    static bool outNode(const Node& n) {
  31.360 +      return !n.in_node;
  31.361      }
  31.362  
  31.363      /// \brief Returns true when the edge is edge in the original graph.
  31.364      ///
  31.365      /// Returns true when the edge is edge in the original graph.
  31.366 -    static bool origEdge(const Edge& edge) {
  31.367 -      return edge.item.firstState();
  31.368 +    static bool origEdge(const Edge& e) {
  31.369 +      return e.item.firstState();
  31.370      }
  31.371  
  31.372      /// \brief Returns true when the edge binds an in-node and an out-node.
  31.373      ///
  31.374      /// Returns true when the edge binds an in-node and an out-node.
  31.375 -    static bool bindEdge(const Edge& edge) {
  31.376 -      return edge.item.secondState();
  31.377 +    static bool bindEdge(const Edge& e) {
  31.378 +      return e.item.secondState();
  31.379      }
  31.380  
  31.381      /// \brief Gives back the in-node created from the \c node.
  31.382      ///
  31.383      /// Gives back the in-node created from the \c node.
  31.384 -    static Node inNode(const GraphNode& node) {
  31.385 -      return Node(node, true);
  31.386 +    static Node inNode(const GraphNode& n) {
  31.387 +      return Node(n, true);
  31.388      }
  31.389  
  31.390      /// \brief Gives back the out-node created from the \c node.
  31.391      ///
  31.392      /// Gives back the out-node created from the \c node.
  31.393 -    static Node outNode(const GraphNode& node) {
  31.394 -      return Node(node, false);
  31.395 +    static Node outNode(const GraphNode& n) {
  31.396 +      return Node(n, false);
  31.397      }
  31.398  
  31.399      /// \brief Gives back the edge binds the two part of the node.
  31.400      /// 
  31.401      /// Gives back the edge binds the two part of the node.
  31.402 -    static Edge edge(const GraphNode& node) {
  31.403 -      return Edge(node);
  31.404 +    static Edge edge(const GraphNode& n) {
  31.405 +      return Edge(n);
  31.406      }
  31.407  
  31.408      /// \brief Gives back the edge of the original edge.
  31.409      /// 
  31.410      /// Gives back the edge of the original edge.
  31.411 -    static Edge edge(const GraphEdge& edge) {
  31.412 -      return Edge(edge);
  31.413 +    static Edge edge(const GraphEdge& e) {
  31.414 +      return Edge(e);
  31.415      }
  31.416  
  31.417      typedef True NodeNumTag;
  31.418 @@ -2005,17 +2005,18 @@
  31.419  
  31.420      typedef True FindEdgeTag;
  31.421  
  31.422 -    Edge findEdge(const Node& source, const Node& target, 
  31.423 +    Edge findEdge(const Node& u, const Node& v, 
  31.424  		  const Edge& prev = INVALID) const {
  31.425 -      if (inNode(source)) {
  31.426 -        if (outNode(target)) {
  31.427 -          if ((GraphNode&)source == (GraphNode&)target && prev == INVALID) {
  31.428 -            return Edge(source);
  31.429 +      if (inNode(u)) {
  31.430 +        if (outNode(v)) {
  31.431 +          if (static_cast<const GraphNode&>(u) == 
  31.432 +              static_cast<const GraphNode&>(v) && prev == INVALID) {
  31.433 +            return Edge(u);
  31.434            }
  31.435          }
  31.436        } else {
  31.437 -        if (inNode(target)) {
  31.438 -          return Edge(findEdge(*Parent::graph, source, target, prev));
  31.439 +        if (inNode(v)) {
  31.440 +          return Edge(findEdge(*Parent::graph, u, v, prev));
  31.441          }
  31.442        }
  31.443        return INVALID;
  31.444 @@ -2191,7 +2192,7 @@
  31.445  
  31.446        virtual void add(const std::vector<GraphNode>& gn) {
  31.447          std::vector<Node> nodes;
  31.448 -        for (int i = 0; i < (int)gn.size(); ++i) {
  31.449 +        for (int i = 0; i < int(gn.size()); ++i) {
  31.450            nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
  31.451            nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
  31.452          }
  31.453 @@ -2207,7 +2208,7 @@
  31.454  
  31.455        virtual void erase(const std::vector<GraphNode>& gn) {
  31.456          std::vector<Node> nodes;
  31.457 -        for (int i = 0; i < (int)gn.size(); ++i) {
  31.458 +        for (int i = 0; i < int(gn.size()); ++i) {
  31.459            nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
  31.460            nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
  31.461          }
  31.462 @@ -2253,10 +2254,10 @@
  31.463        : Parent(), node_notifier(*this), edge_notifier(*this), 
  31.464          node_notifier_proxy(*this), edge_notifier_proxy(*this) {}
  31.465      
  31.466 -    void setGraph(_Graph& graph) {
  31.467 -      Parent::setGraph(graph);
  31.468 -      node_notifier_proxy.setNotifier(graph.notifier(GraphNode()));
  31.469 -      edge_notifier_proxy.setNotifier(graph.notifier(GraphEdge()));
  31.470 +    void setGraph(_Graph& g) {
  31.471 +      Parent::setGraph(g);
  31.472 +      node_notifier_proxy.setNotifier(g.notifier(GraphNode()));
  31.473 +      edge_notifier_proxy.setNotifier(g.notifier(GraphEdge()));
  31.474      }
  31.475  
  31.476    public:
  31.477 @@ -2307,7 +2308,7 @@
  31.478        virtual void add(const std::vector<GraphNode>& gn) {
  31.479          std::vector<Node> nodes;
  31.480          std::vector<Edge> edges;
  31.481 -        for (int i = 0; i < (int)gn.size(); ++i) {
  31.482 +        for (int i = 0; i < int(gn.size()); ++i) {
  31.483            edges.push_back(AdaptorBase::Parent::edge(gn[i]));
  31.484            nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
  31.485            nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
  31.486 @@ -2325,7 +2326,7 @@
  31.487        virtual void erase(const std::vector<GraphNode>& gn) {
  31.488          std::vector<Node> nodes;
  31.489          std::vector<Edge> edges;
  31.490 -        for (int i = 0; i < (int)gn.size(); ++i) {
  31.491 +        for (int i = 0; i < int(gn.size()); ++i) {
  31.492            edges.push_back(AdaptorBase::Parent::edge(gn[i]));
  31.493            nodes.push_back(AdaptorBase::Parent::inNode(gn[i]));
  31.494            nodes.push_back(AdaptorBase::Parent::outNode(gn[i]));
  31.495 @@ -2335,9 +2336,9 @@
  31.496        }
  31.497        virtual void build() {
  31.498          std::vector<Edge> edges;
  31.499 -        const typename Parent::Notifier* notifier = Parent::notifier();
  31.500 +        const typename Parent::Notifier* nf = Parent::notifier();
  31.501          GraphNode it;
  31.502 -        for (notifier->first(it); it != INVALID; notifier->next(it)) {
  31.503 +        for (nf->first(it); it != INVALID; nf->next(it)) {
  31.504            edges.push_back(AdaptorBase::Parent::edge(it));
  31.505          }
  31.506          adaptor->notifier(Node()).build();
  31.507 @@ -2345,9 +2346,9 @@
  31.508        }
  31.509        virtual void clear() {
  31.510          std::vector<Edge> edges;
  31.511 -        const typename Parent::Notifier* notifier = Parent::notifier();
  31.512 +        const typename Parent::Notifier* nf = Parent::notifier();
  31.513          GraphNode it;
  31.514 -        for (notifier->first(it); it != INVALID; notifier->next(it)) {
  31.515 +        for (nf->first(it); it != INVALID; nf->next(it)) {
  31.516            edges.push_back(AdaptorBase::Parent::edge(it));
  31.517          }
  31.518          adaptor->notifier(Edge()).erase(edges);        
  31.519 @@ -2385,7 +2386,7 @@
  31.520        }
  31.521        virtual void add(const std::vector<GraphEdge>& ge) {
  31.522          std::vector<Edge> edges;
  31.523 -        for (int i = 0; i < (int)ge.size(); ++i) {
  31.524 +        for (int i = 0; i < int(ge.size()); ++i) {
  31.525            edges.push_back(AdaptorBase::edge(ge[i]));
  31.526          }
  31.527          adaptor->notifier(Edge()).add(edges);
  31.528 @@ -2395,25 +2396,25 @@
  31.529        }
  31.530        virtual void erase(const std::vector<GraphEdge>& ge) {
  31.531          std::vector<Edge> edges;
  31.532 -        for (int i = 0; i < (int)ge.size(); ++i) {
  31.533 +        for (int i = 0; i < int(ge.size()); ++i) {
  31.534            edges.push_back(AdaptorBase::edge(ge[i]));
  31.535          }
  31.536          adaptor->notifier(Edge()).erase(edges);
  31.537        }
  31.538        virtual void build() {
  31.539          std::vector<Edge> edges;
  31.540 -        const typename Parent::Notifier* notifier = Parent::notifier();
  31.541 +        const typename Parent::Notifier* nf = Parent::notifier();
  31.542          GraphEdge it;
  31.543 -        for (notifier->first(it); it != INVALID; notifier->next(it)) {
  31.544 +        for (nf->first(it); it != INVALID; nf->next(it)) {
  31.545            edges.push_back(AdaptorBase::Parent::edge(it));
  31.546          }
  31.547          adaptor->notifier(Edge()).add(edges);
  31.548        }
  31.549        virtual void clear() {
  31.550          std::vector<Edge> edges;
  31.551 -        const typename Parent::Notifier* notifier = Parent::notifier();
  31.552 +        const typename Parent::Notifier* nf = Parent::notifier();
  31.553          GraphEdge it;
  31.554 -        for (notifier->first(it); it != INVALID; notifier->next(it)) {
  31.555 +        for (nf->first(it); it != INVALID; nf->next(it)) {
  31.556            edges.push_back(AdaptorBase::Parent::edge(it));
  31.557          }
  31.558          adaptor->notifier(Edge()).erase(edges);
  31.559 @@ -2509,8 +2510,8 @@
  31.560      /// \brief Constructor of the adaptor.
  31.561      ///
  31.562      /// Constructor of the adaptor.
  31.563 -    SplitGraphAdaptor(_Graph& graph) {
  31.564 -      Parent::setGraph(graph);
  31.565 +    SplitGraphAdaptor(_Graph& g) {
  31.566 +      Parent::setGraph(g);
  31.567      }
  31.568  
  31.569      /// \brief NodeMap combined from two original NodeMap
    32.1 --- a/lemon/graph_reader.h	Fri Mar 02 17:56:22 2007 +0000
    32.2 +++ b/lemon/graph_reader.h	Fri Mar 02 18:04:28 2007 +0000
    32.3 @@ -184,27 +184,27 @@
    32.4      /// \brief Give a new node map reading command to the reader.
    32.5      ///
    32.6      /// Give a new node map reading command to the reader.
    32.7 -    template <typename Reader, typename Map>
    32.8 +    template <typename ItemReader, typename Map>
    32.9      GraphReader& readNodeMap(std::string name, Map& map, 
   32.10 -			     const Reader& reader = Reader()) {
   32.11 -      nodeset_reader.readNodeMap(name, map, reader);
   32.12 +			     const ItemReader& ir = ItemReader()) {
   32.13 +      nodeset_reader.readNodeMap(name, map, ir);
   32.14        return *this;
   32.15      }
   32.16  
   32.17 -    template <typename Reader, typename Map>
   32.18 +    template <typename ItemReader, typename Map>
   32.19      GraphReader& readNodeMap(std::string name, const Map& map, 
   32.20 -			     const Reader& reader = Reader()) {
   32.21 -      nodeset_reader.readNodeMap(name, map, reader);
   32.22 +			     const ItemReader& ir = ItemReader()) {
   32.23 +      nodeset_reader.readNodeMap(name, map, ir);
   32.24        return *this;
   32.25      }
   32.26  
   32.27      /// \brief Give a new node map skipping command to the reader.
   32.28      ///
   32.29      /// Give a new node map skipping command to the reader.
   32.30 -    template <typename Reader>
   32.31 +    template <typename ItemReader>
   32.32      GraphReader& skipNodeMap(std::string name, 
   32.33 -			     const Reader& reader = Reader()) {
   32.34 -      nodeset_reader.skipNodeMap(name, reader);
   32.35 +			     const ItemReader& ir = ItemReader()) {
   32.36 +      nodeset_reader.skipNodeMap(name, ir);
   32.37        return *this;
   32.38      }
   32.39  
   32.40 @@ -227,27 +227,27 @@
   32.41      /// \brief Give a new edge map reading command to the reader.
   32.42      ///
   32.43      /// Give a new edge map reading command to the reader.
   32.44 -    template <typename Reader, typename Map>
   32.45 +    template <typename ItemReader, typename Map>
   32.46      GraphReader& readEdgeMap(std::string name, Map& map,
   32.47 -			     const Reader& reader = Reader()) {
   32.48 -      edgeset_reader.readEdgeMap(name, map, reader);
   32.49 +			     const ItemReader& ir = ItemReader()) {
   32.50 +      edgeset_reader.readEdgeMap(name, map, ir);
   32.51        return *this;
   32.52      }
   32.53  
   32.54 -    template <typename Reader, typename Map>
   32.55 +    template <typename ItemReader, typename Map>
   32.56      GraphReader& readEdgeMap(std::string name, const Map& map,
   32.57 -			     const Reader& reader = Reader()) {
   32.58 -      edgeset_reader.readEdgeMap(name, map, reader);
   32.59 +			     const ItemReader& ir = ItemReader()) {
   32.60 +      edgeset_reader.readEdgeMap(name, map, ir);
   32.61        return *this;
   32.62      }
   32.63  
   32.64      /// \brief Give a new edge map skipping command to the reader.
   32.65      ///
   32.66      /// Give a new edge map skipping command to the reader.
   32.67 -    template <typename Reader>
   32.68 +    template <typename ItemReader>
   32.69      GraphReader& skipEdgeMap(std::string name, 
   32.70 -			     const Reader& reader = Reader()) {
   32.71 -      edgeset_reader.skipEdgeMap(name, reader);
   32.72 +			     const ItemReader& ir = ItemReader()) {
   32.73 +      edgeset_reader.skipEdgeMap(name, ir);
   32.74        return *this;
   32.75      }
   32.76  
   32.77 @@ -279,10 +279,10 @@
   32.78      /// \brief Give a new attribute reading command.
   32.79      ///
   32.80      ///  Give a new attribute reading command.
   32.81 -    template <typename Reader, typename Value>
   32.82 +    template <typename ItemReader, typename Value>
   32.83      GraphReader& readAttribute(std::string name, Value& value, 
   32.84 -			       const Reader& reader) {
   32.85 -      attribute_reader.readAttribute<Reader>(name, value, reader);
   32.86 +			       const ItemReader& ir = ItemReader()) {
   32.87 +      attribute_reader.readAttribute(name, value, ir);
   32.88        return *this;
   32.89      }
   32.90  
   32.91 @@ -504,27 +504,27 @@
   32.92      /// \brief Give a new node map reading command to the reader.
   32.93      ///
   32.94      /// Give a new node map reading command to the reader.
   32.95 -    template <typename Reader, typename Map>
   32.96 +    template <typename ItemReader, typename Map>
   32.97      UGraphReader& readNodeMap(std::string name, Map& map, 
   32.98 -				  const Reader& reader = Reader()) {
   32.99 -      nodeset_reader.readNodeMap(name, map, reader);
  32.100 +                              const ItemReader& ir = ItemReader()) {
  32.101 +      nodeset_reader.readNodeMap(name, map, ir);
  32.102        return *this;
  32.103      }
  32.104  
  32.105 -    template <typename Reader, typename Map>
  32.106 +    template <typename ItemReader, typename Map>
  32.107      UGraphReader& readNodeMap(std::string name, const Map& map, 
  32.108 -				  const Reader& reader = Reader()) {
  32.109 -      nodeset_reader.readNodeMap(name, map, reader);
  32.110 +                              const ItemReader& ir = ItemReader()) {
  32.111 +      nodeset_reader.readNodeMap(name, map, ir);
  32.112        return *this;
  32.113      }
  32.114  
  32.115      /// \brief Give a new node map skipping command to the reader.
  32.116      ///
  32.117      /// Give a new node map skipping command to the reader.
  32.118 -    template <typename Reader>
  32.119 +    template <typename ItemReader>
  32.120      UGraphReader& skipNodeMap(std::string name, 
  32.121 -			     const Reader& reader = Reader()) {
  32.122 -      nodeset_reader.skipNodeMap(name, reader);
  32.123 +                              const ItemReader& ir = ItemReader()) {
  32.124 +      nodeset_reader.skipNodeMap(name, ir);
  32.125        return *this;
  32.126      }
  32.127  
  32.128 @@ -547,27 +547,27 @@
  32.129      /// \brief Give a new undirected edge map reading command to the reader.
  32.130      ///
  32.131      /// Give a new undirected edge map reading command to the reader.
  32.132 -    template <typename Reader, typename Map>
  32.133 +    template <typename ItemReader, typename Map>
  32.134      UGraphReader& readUEdgeMap(std::string name, Map& map,
  32.135 -				       const Reader& reader = Reader()) {
  32.136 -      u_edgeset_reader.readUEdgeMap(name, map, reader);
  32.137 +                               const ItemReader& ir = ItemReader()) {
  32.138 +      u_edgeset_reader.readUEdgeMap(name, map, ir);
  32.139        return *this;
  32.140      }
  32.141  
  32.142 -    template <typename Reader, typename Map>
  32.143 +    template <typename ItemReader, typename Map>
  32.144      UGraphReader& readUEdgeMap(std::string name, const Map& map,
  32.145 -				       const Reader& reader = Reader()) {
  32.146 -      u_edgeset_reader.readUEdgeMap(name, map, reader);
  32.147 +                               const ItemReader& ir = ItemReader()) {
  32.148 +      u_edgeset_reader.readUEdgeMap(name, map, ir);
  32.149        return *this;
  32.150      }
  32.151  
  32.152      /// \brief Give a new undirected edge map skipping command to the reader.
  32.153      ///
  32.154      /// Give a new undirected edge map skipping command to the reader.
  32.155 -    template <typename Reader>
  32.156 +    template <typename ItemReader>
  32.157      UGraphReader& skipUEdgeMap(std::string name,
  32.158 -				       const Reader& reader = Reader()) {
  32.159 -      u_edgeset_reader.skipUMap(name, reader);
  32.160 +				       const ItemReader& ir = ItemReader()) {
  32.161 +      u_edgeset_reader.skipUMap(name, ir);
  32.162        return *this;
  32.163      }
  32.164  
  32.165 @@ -591,27 +591,27 @@
  32.166      /// \brief Give a new edge map reading command to the reader.
  32.167      ///
  32.168      /// Give a new edge map reading command to the reader.
  32.169 -    template <typename Reader, typename Map>
  32.170 +    template <typename ItemReader, typename Map>
  32.171      UGraphReader& readEdgeMap(std::string name, Map& map,
  32.172 -				       const Reader& reader = Reader()) {
  32.173 -      u_edgeset_reader.readEdgeMap(name, map, reader);
  32.174 +                              const ItemReader& ir = ItemReader()) {
  32.175 +      u_edgeset_reader.readEdgeMap(name, map, ir);
  32.176        return *this;
  32.177      }
  32.178  
  32.179 -    template <typename Reader, typename Map>
  32.180 +    template <typename ItemReader, typename Map>
  32.181      UGraphReader& readEdgeMap(std::string name, const Map& map,
  32.182 -				       const Reader& reader = Reader()) {
  32.183 -      u_edgeset_reader.readEdgeMap(name, map, reader);
  32.184 +                              const ItemReader& ir = ItemReader()) {
  32.185 +      u_edgeset_reader.readEdgeMap(name, map, ir);
  32.186        return *this;
  32.187      }
  32.188  
  32.189      /// \brief Give a new edge map skipping command to the reader.
  32.190      ///
  32.191      /// Give a new edge map skipping command to the reader.
  32.192 -    template <typename Reader>
  32.193 +    template <typename ItemReader>
  32.194      UGraphReader& skipEdgeMap(std::string name,
  32.195 -				       const Reader& reader = Reader()) {
  32.196 -      u_edgeset_reader.skipEdgeMap(name, reader);
  32.197 +                              const ItemReader& ir = ItemReader()) {
  32.198 +      u_edgeset_reader.skipEdgeMap(name, ir);
  32.199        return *this;
  32.200      }
  32.201  
  32.202 @@ -650,10 +650,10 @@
  32.203      /// \brief Give a new attribute reading command.
  32.204      ///
  32.205      ///  Give a new attribute reading command.
  32.206 -    template <typename Reader, typename Value>
  32.207 +    template <typename ItemReader, typename Value>
  32.208      UGraphReader& readAttribute(std::string name, Value& value, 
  32.209 -			       const Reader& reader) {
  32.210 -      attribute_reader.readAttribute<Reader>(name, value, reader);
  32.211 +			       const ItemReader& ir = ItemReader()) {
  32.212 +      attribute_reader.readAttribute(name, value, ir);
  32.213        return *this;
  32.214      }
  32.215  
    33.1 --- a/lemon/graph_to_eps.h	Fri Mar 02 17:56:22 2007 +0000
    33.2 +++ b/lemon/graph_to_eps.h	Fri Mar 02 18:04:28 2007 +0000
    33.3 @@ -949,14 +949,14 @@
    33.4  	      node_shape=_nodeShapes[g.target(*e)];
    33.5  	      dim2::Bezier3 bez(s,mm,mm,t);
    33.6  	      double t1=0,t2=1;
    33.7 -	      for(int i=0;i<INTERPOL_PREC;++i)
    33.8 +	      for(int ii=0;ii<INTERPOL_PREC;++ii)
    33.9  		if(isInsideNode(bez((t1+t2)/2)-t,rn,node_shape)) t2=(t1+t2)/2;
   33.10  		else t1=(t1+t2)/2;
   33.11  	      dim2::Point<double> apoint=bez((t1+t2)/2);
   33.12  	      rn = _arrowLength+_edgeWidths[*e]*_edgeWidthScale;
   33.13  	      rn*=rn;
   33.14  	      t2=(t1+t2)/2;t1=0;
   33.15 -	      for(int i=0;i<INTERPOL_PREC;++i)
   33.16 +	      for(int ii=0;ii<INTERPOL_PREC;++ii)
   33.17  		if((bez((t1+t2)/2)-apoint).normSquare()>rn) t1=(t1+t2)/2;
   33.18  		else t2=(t1+t2)/2;
   33.19  	      dim2::Point<double> linend=bez((t1+t2)/2);	      
    34.1 --- a/lemon/graph_utils.h	Fri Mar 02 17:56:22 2007 +0000
    34.2 +++ b/lemon/graph_utils.h	Fri Mar 02 18:04:28 2007 +0000
    34.3 @@ -790,10 +790,10 @@
    34.4      ///
    34.5      /// Destructor of the GraphCopy
    34.6      ~GraphCopy() {
    34.7 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
    34.8 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
    34.9          delete nodeMapCopies[i];
   34.10        }
   34.11 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
   34.12 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
   34.13          delete edgeMapCopies[i];
   34.14        }
   34.15  
   34.16 @@ -836,9 +836,9 @@
   34.17      /// \brief Make a copy of the given node.
   34.18      ///
   34.19      /// Make a copy of the given node.
   34.20 -    GraphCopy& node(TNode& tnode, const Node& node) {
   34.21 +    GraphCopy& node(TNode& tnode, const Node& snode) {
   34.22        nodeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Node, 
   34.23 -                              NodeRefMap, TNode>(tnode, node));
   34.24 +                              NodeRefMap, TNode>(tnode, snode));
   34.25        return *this;
   34.26      }
   34.27  
   34.28 @@ -879,9 +879,9 @@
   34.29      /// \brief Make a copy of the given edge.
   34.30      ///
   34.31      /// Make a copy of the given edge.
   34.32 -    GraphCopy& edge(TEdge& tedge, const Edge& edge) {
   34.33 +    GraphCopy& edge(TEdge& tedge, const Edge& sedge) {
   34.34        edgeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Edge, 
   34.35 -                              EdgeRefMap, TEdge>(tedge, edge));
   34.36 +                              EdgeRefMap, TEdge>(tedge, sedge));
   34.37        return *this;
   34.38      }
   34.39  
   34.40 @@ -893,10 +893,10 @@
   34.41        EdgeRefMap edgeRefMap(source);
   34.42        _graph_utils_bits::GraphCopySelector<Target>::
   34.43          copy(target, source, nodeRefMap, edgeRefMap);
   34.44 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
   34.45 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
   34.46          nodeMapCopies[i]->copy(source, nodeRefMap);
   34.47        }
   34.48 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
   34.49 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
   34.50          edgeMapCopies[i]->copy(source, edgeRefMap);
   34.51        }      
   34.52      }
   34.53 @@ -967,9 +967,10 @@
   34.54        typedef typename Target::Edge Value;
   34.55  
   34.56        Value operator[](const Key& key) const {
   34.57 -        bool forward = (source.direction(key) == 
   34.58 -                        (node_ref[source.source((UEdge)key)] == 
   34.59 -                         target.source(uedge_ref[(UEdge)key])));
   34.60 +        bool forward = 
   34.61 +          (source.direction(key) == 
   34.62 +           (node_ref[source.source(static_cast<const UEdge&>(key))] == 
   34.63 +            target.source(uedge_ref[static_cast<const UEdge&>(key)])));
   34.64  	return target.direct(uedge_ref[key], forward); 
   34.65        }
   34.66        
   34.67 @@ -994,13 +995,13 @@
   34.68      ///
   34.69      /// Destructor of the GraphCopy
   34.70      ~UGraphCopy() {
   34.71 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
   34.72 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
   34.73          delete nodeMapCopies[i];
   34.74        }
   34.75 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
   34.76 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
   34.77          delete edgeMapCopies[i];
   34.78        }
   34.79 -      for (int i = 0; i < (int)uEdgeMapCopies.size(); ++i) {
   34.80 +      for (int i = 0; i < int(uEdgeMapCopies.size()); ++i) {
   34.81          delete uEdgeMapCopies[i];
   34.82        }
   34.83  
   34.84 @@ -1043,9 +1044,9 @@
   34.85      /// \brief Make a copy of the given node.
   34.86      ///
   34.87      /// Make a copy of the given node.
   34.88 -    UGraphCopy& node(TNode& tnode, const Node& node) {
   34.89 +    UGraphCopy& node(TNode& tnode, const Node& snode) {
   34.90        nodeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Node, 
   34.91 -                              NodeRefMap, TNode>(tnode, node));
   34.92 +                              NodeRefMap, TNode>(tnode, snode));
   34.93        return *this;
   34.94      }
   34.95  
   34.96 @@ -1086,9 +1087,9 @@
   34.97      /// \brief Make a copy of the given edge.
   34.98      ///
   34.99      /// Make a copy of the given edge.
  34.100 -    UGraphCopy& edge(TEdge& tedge, const Edge& edge) {
  34.101 +    UGraphCopy& edge(TEdge& tedge, const Edge& sedge) {
  34.102        edgeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Edge, 
  34.103 -                              EdgeRefMap, TEdge>(tedge, edge));
  34.104 +                              EdgeRefMap, TEdge>(tedge, sedge));
  34.105        return *this;
  34.106      }
  34.107  
  34.108 @@ -1129,9 +1130,9 @@
  34.109      /// \brief Make a copy of the given undirected edge.
  34.110      ///
  34.111      /// Make a copy of the given undirected edge.
  34.112 -    UGraphCopy& uEdge(TUEdge& tuedge, const UEdge& uedge) {
  34.113 +    UGraphCopy& uEdge(TUEdge& tuedge, const UEdge& suedge) {
  34.114        uEdgeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, UEdge, 
  34.115 -                               UEdgeRefMap, TUEdge>(tuedge, uedge));
  34.116 +                               UEdgeRefMap, TUEdge>(tuedge, suedge));
  34.117        return *this;
  34.118      }
  34.119  
  34.120 @@ -1144,13 +1145,13 @@
  34.121        EdgeRefMap edgeRefMap(target, source, uEdgeRefMap, nodeRefMap);
  34.122        _graph_utils_bits::UGraphCopySelector<Target>::
  34.123          copy(target, source, nodeRefMap, uEdgeRefMap);
  34.124 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
  34.125 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
  34.126          nodeMapCopies[i]->copy(source, nodeRefMap);
  34.127        }
  34.128 -      for (int i = 0; i < (int)uEdgeMapCopies.size(); ++i) {
  34.129 +      for (int i = 0; i < int(uEdgeMapCopies.size()); ++i) {
  34.130          uEdgeMapCopies[i]->copy(source, uEdgeRefMap);
  34.131        }
  34.132 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
  34.133 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
  34.134          edgeMapCopies[i]->copy(source, edgeRefMap);
  34.135        }
  34.136      }
  34.137 @@ -1245,9 +1246,10 @@
  34.138        typedef typename Target::Edge Value;
  34.139  
  34.140        Value operator[](const Key& key) const {
  34.141 -        bool forward = (source.direction(key) == 
  34.142 -                        (node_ref[source.source((UEdge)key)] == 
  34.143 -                         target.source(uedge_ref[(UEdge)key])));
  34.144 +        bool forward = 
  34.145 +          (source.direction(key) == 
  34.146 +           (node_ref[source.source(static_cast<const UEdge&>(key))] == 
  34.147 +            target.source(uedge_ref[static_cast<const UEdge&>(key)])));
  34.148  	return target.direct(uedge_ref[key], forward); 
  34.149        }
  34.150        
  34.151 @@ -1271,19 +1273,19 @@
  34.152      ///
  34.153      /// Destructor of the GraphCopy
  34.154      ~BpUGraphCopy() {
  34.155 -      for (int i = 0; i < (int)aNodeMapCopies.size(); ++i) {
  34.156 +      for (int i = 0; i < int(aNodeMapCopies.size()); ++i) {
  34.157          delete aNodeMapCopies[i];
  34.158        }
  34.159 -      for (int i = 0; i < (int)bNodeMapCopies.size(); ++i) {
  34.160 +      for (int i = 0; i < int(bNodeMapCopies.size()); ++i) {
  34.161          delete bNodeMapCopies[i];
  34.162        }
  34.163 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
  34.164 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
  34.165          delete nodeMapCopies[i];
  34.166        }
  34.167 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
  34.168 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
  34.169          delete edgeMapCopies[i];
  34.170        }
  34.171 -      for (int i = 0; i < (int)uEdgeMapCopies.size(); ++i) {
  34.172 +      for (int i = 0; i < int(uEdgeMapCopies.size()); ++i) {
  34.173          delete uEdgeMapCopies[i];
  34.174        }
  34.175  
  34.176 @@ -1393,9 +1395,9 @@
  34.177      /// \brief Make a copy of the given node.
  34.178      ///
  34.179      /// Make a copy of the given node.
  34.180 -    BpUGraphCopy& node(TNode& tnode, const Node& node) {
  34.181 +    BpUGraphCopy& node(TNode& tnode, const Node& snode) {
  34.182        nodeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Node, 
  34.183 -                              NodeRefMap, TNode>(tnode, node));
  34.184 +                              NodeRefMap, TNode>(tnode, snode));
  34.185        return *this;
  34.186      }
  34.187  
  34.188 @@ -1436,9 +1438,9 @@
  34.189      /// \brief Make a copy of the given edge.
  34.190      ///
  34.191      /// Make a copy of the given edge.
  34.192 -    BpUGraphCopy& edge(TEdge& tedge, const Edge& edge) {
  34.193 +    BpUGraphCopy& edge(TEdge& tedge, const Edge& sedge) {
  34.194        edgeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, Edge, 
  34.195 -                              EdgeRefMap, TEdge>(tedge, edge));
  34.196 +                              EdgeRefMap, TEdge>(tedge, sedge));
  34.197        return *this;
  34.198      }
  34.199  
  34.200 @@ -1479,9 +1481,9 @@
  34.201      /// \brief Make a copy of the given undirected edge.
  34.202      ///
  34.203      /// Make a copy of the given undirected edge.
  34.204 -    BpUGraphCopy& uEdge(TUEdge& tuedge, const UEdge& uedge) {
  34.205 +    BpUGraphCopy& uEdge(TUEdge& tuedge, const UEdge& suedge) {
  34.206        uEdgeMapCopies.push_back(new _graph_utils_bits::ItemCopy<Source, UEdge, 
  34.207 -                               UEdgeRefMap, TUEdge>(tuedge, uedge));
  34.208 +                               UEdgeRefMap, TUEdge>(tuedge, suedge));
  34.209        return *this;
  34.210      }
  34.211  
  34.212 @@ -1496,19 +1498,19 @@
  34.213        EdgeRefMap edgeRefMap(target, source, uEdgeRefMap, nodeRefMap);
  34.214        _graph_utils_bits::BpUGraphCopySelector<Target>::
  34.215          copy(target, source, aNodeRefMap, bNodeRefMap, uEdgeRefMap);
  34.216 -      for (int i = 0; i < (int)aNodeMapCopies.size(); ++i) {
  34.217 +      for (int i = 0; i < int(aNodeMapCopies.size()); ++i) {
  34.218          aNodeMapCopies[i]->copy(source, aNodeRefMap);
  34.219        }
  34.220 -      for (int i = 0; i < (int)bNodeMapCopies.size(); ++i) {
  34.221 +      for (int i = 0; i < int(bNodeMapCopies.size()); ++i) {
  34.222          bNodeMapCopies[i]->copy(source, bNodeRefMap);
  34.223        }
  34.224 -      for (int i = 0; i < (int)nodeMapCopies.size(); ++i) {
  34.225 +      for (int i = 0; i < int(nodeMapCopies.size()); ++i) {
  34.226          nodeMapCopies[i]->copy(source, nodeRefMap);
  34.227        }
  34.228 -      for (int i = 0; i < (int)uEdgeMapCopies.size(); ++i) {
  34.229 +      for (int i = 0; i < int(uEdgeMapCopies.size()); ++i) {
  34.230          uEdgeMapCopies[i]->copy(source, uEdgeRefMap);
  34.231        }
  34.232 -      for (int i = 0; i < (int)edgeMapCopies.size(); ++i) {
  34.233 +      for (int i = 0; i < int(edgeMapCopies.size()); ++i) {
  34.234          edgeMapCopies[i]->copy(source, edgeRefMap);
  34.235        }
  34.236      }
  34.237 @@ -1777,7 +1779,7 @@
  34.238      /// Erase more keys from the map. It is called by the
  34.239      /// \c AlterationNotifier.
  34.240      virtual void erase(const std::vector<Key>& keys) {
  34.241 -      for (int i = 0; i < (int)keys.size(); ++i) {
  34.242 +      for (int i = 0; i < int(keys.size()); ++i) {
  34.243  	Value val = Map::operator[](keys[i]);
  34.244  	typename Container::iterator it = invMap.find(val);
  34.245  	if (it != invMap.end() && it->second == keys[i]) {
  34.246 @@ -1873,8 +1875,8 @@
  34.247      /// Constructor for descriptor map.
  34.248      explicit DescriptorMap(const Graph& _graph) : Map(_graph) {
  34.249        Item it;
  34.250 -      const typename Map::Notifier* notifier = Map::notifier(); 
  34.251 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
  34.252 +      const typename Map::Notifier* nf = Map::notifier(); 
  34.253 +      for (nf->first(it); it != INVALID; nf->next(it)) {
  34.254  	Map::set(it, invMap.size());
  34.255  	invMap.push_back(it);	
  34.256        }      
  34.257 @@ -1898,7 +1900,7 @@
  34.258      /// \c AlterationNotifier.
  34.259      virtual void add(const std::vector<Item>& items) {
  34.260        Map::add(items);
  34.261 -      for (int i = 0; i < (int)items.size(); ++i) {
  34.262 +      for (int i = 0; i < int(items.size()); ++i) {
  34.263  	Map::set(items[i], invMap.size());
  34.264  	invMap.push_back(items[i]);
  34.265        }
  34.266 @@ -1920,7 +1922,7 @@
  34.267      /// Erase more keys from the map. It is called by the
  34.268      /// \c AlterationNotifier.
  34.269      virtual void erase(const std::vector<Item>& items) {
  34.270 -      for (int i = 0; i < (int)items.size(); ++i) {
  34.271 +      for (int i = 0; i < int(items.size()); ++i) {
  34.272  	Map::set(invMap.back(), Map::operator[](items[i]));
  34.273  	invMap[Map::operator[](items[i])] = invMap.back();
  34.274  	invMap.pop_back();
  34.275 @@ -1935,8 +1937,8 @@
  34.276      virtual void build() {
  34.277        Map::build();
  34.278        Item it;
  34.279 -      const typename Map::Notifier* notifier = Map::notifier(); 
  34.280 -      for (notifier->first(it); it != INVALID; notifier->next(it)) {
  34.281 +      const typename Map::Notifier* nf = Map::notifier(); 
  34.282 +      for (nf->first(it); it != INVALID; nf->next(it)) {
  34.283  	Map::set(it, invMap.size());
  34.284  	invMap.push_back(it);	
  34.285        }      
  34.286 @@ -2280,7 +2282,7 @@
  34.287  
  34.288        virtual void add(const std::vector<Key>& keys) {
  34.289  	Parent::add(keys);
  34.290 -	for (int i = 0; i < (int)keys.size(); ++i) {
  34.291 +	for (int i = 0; i < int(keys.size()); ++i) {
  34.292  	  Parent::set(keys[i], 0);
  34.293  	}
  34.294        }
  34.295 @@ -2313,7 +2315,7 @@
  34.296      }
  34.297  
  34.298      virtual void add(const std::vector<Edge>& edges) {
  34.299 -      for (int i = 0; i < (int)edges.size(); ++i) {
  34.300 +      for (int i = 0; i < int(edges.size()); ++i) {
  34.301          ++deg[graph.target(edges[i])];
  34.302        }
  34.303      }
  34.304 @@ -2323,7 +2325,7 @@
  34.305      }
  34.306  
  34.307      virtual void erase(const std::vector<Edge>& edges) {
  34.308 -      for (int i = 0; i < (int)edges.size(); ++i) {
  34.309 +      for (int i = 0; i < int(edges.size()); ++i) {
  34.310          --deg[graph.target(edges[i])];
  34.311        }
  34.312      }
  34.313 @@ -2392,7 +2394,7 @@
  34.314        }
  34.315        virtual void add(const std::vector<Key>& keys) {
  34.316  	Parent::add(keys);
  34.317 -	for (int i = 0; i < (int)keys.size(); ++i) {
  34.318 +	for (int i = 0; i < int(keys.size()); ++i) {
  34.319  	  Parent::set(keys[i], 0);
  34.320  	}
  34.321        }
  34.322 @@ -2425,7 +2427,7 @@
  34.323      }
  34.324  
  34.325      virtual void add(const std::vector<Edge>& edges) {
  34.326 -      for (int i = 0; i < (int)edges.size(); ++i) {
  34.327 +      for (int i = 0; i < int(edges.size()); ++i) {
  34.328          ++deg[graph.source(edges[i])];
  34.329        }
  34.330      }
  34.331 @@ -2435,7 +2437,7 @@
  34.332      }
  34.333  
  34.334      virtual void erase(const std::vector<Edge>& edges) {
  34.335 -      for (int i = 0; i < (int)edges.size(); ++i) {
  34.336 +      for (int i = 0; i < int(edges.size()); ++i) {
  34.337          --deg[graph.source(edges[i])];
  34.338        }
  34.339      }
    35.1 --- a/lemon/graph_writer.h	Fri Mar 02 17:56:22 2007 +0000
    35.2 +++ b/lemon/graph_writer.h	Fri Mar 02 18:04:28 2007 +0000
    35.3 @@ -158,8 +158,8 @@
    35.4      ///
    35.5     /// This function issues a new <i> node map writing command</i> to the writer.
    35.6      template <typename Map>
    35.7 -    GraphWriter& writeNodeMap(std::string name, const Map& map) {
    35.8 -      nodeset_writer.writeNodeMap(name, map);
    35.9 +    GraphWriter& writeNodeMap(std::string label, const Map& map) {
   35.10 +      nodeset_writer.writeNodeMap(label, map);
   35.11        return *this;
   35.12      }
   35.13  
   35.14 @@ -167,10 +167,10 @@
   35.15      /// \brief Issue a new node map writing command for the writer.
   35.16      ///
   35.17     /// This function issues a new <i> node map writing command</i> to the writer.
   35.18 -    template <typename Writer, typename Map>
   35.19 -    GraphWriter& writeNodeMap(std::string name, const Map& map, 
   35.20 -			      const Writer& writer = Writer()) {
   35.21 -      nodeset_writer.writeNodeMap(name, map, writer);
   35.22 +    template <typename ItemWriter, typename Map>
   35.23 +    GraphWriter& writeNodeMap(std::string label, const Map& map, 
   35.24 +			      const ItemWriter& iw = ItemWriter()) {
   35.25 +      nodeset_writer.writeNodeMap(label, map, iw);
   35.26        return *this;
   35.27      }
   35.28  
   35.29 @@ -179,8 +179,8 @@
   35.30      ///
   35.31     /// This function issues a new <i> edge map writing command</i> to the writer.
   35.32      template <typename Map>
   35.33 -    GraphWriter& writeEdgeMap(std::string name, const Map& map) { 
   35.34 -      edgeset_writer.writeEdgeMap(name, map);
   35.35 +    GraphWriter& writeEdgeMap(std::string label, const Map& map) { 
   35.36 +      edgeset_writer.writeEdgeMap(label, map);
   35.37        return *this;
   35.38      }
   35.39  
   35.40 @@ -188,10 +188,10 @@
   35.41      /// \brief Issue a new edge map writing command for the writer.
   35.42      ///
   35.43     /// This function issues a new <i> edge map writing command</i> to the writer.
   35.44 -    template <typename Writer, typename Map>
   35.45 -    GraphWriter& writeEdgeMap(std::string name, const Map& map,
   35.46 -			      const Writer& writer = Writer()) {
   35.47 -      edgeset_writer.writeEdgeMap(name, map, writer);
   35.48 +    template <typename ItemWriter, typename Map>
   35.49 +    GraphWriter& writeEdgeMap(std::string label, const Map& map,
   35.50 +			      const ItemWriter& iw = ItemWriter()) {
   35.51 +      edgeset_writer.writeEdgeMap(label, map, iw);
   35.52        return *this;
   35.53      }
   35.54  
   35.55 @@ -199,8 +199,8 @@
   35.56      ///
   35.57      /// This function issues a new <i> labeled node writing command</i> 
   35.58      /// to the writer.
   35.59 -    GraphWriter& writeNode(std::string name, const Node& node) {
   35.60 -      node_writer.writeNode(name, node);
   35.61 +    GraphWriter& writeNode(std::string label, const Node& node) {
   35.62 +      node_writer.writeNode(label, node);
   35.63        return *this;
   35.64      }
   35.65  
   35.66 @@ -208,8 +208,8 @@
   35.67      ///
   35.68      /// This function issues a new <i> labeled edge writing command</i> 
   35.69      /// to the writer.
   35.70 -    GraphWriter& writeEdge(std::string name, const Edge& edge) {
   35.71 -      edge_writer.writeEdge(name, edge);
   35.72 +    GraphWriter& writeEdge(std::string label, const Edge& edge) {
   35.73 +      edge_writer.writeEdge(label, edge);
   35.74      }
   35.75  
   35.76      /// \brief Issue a new attribute writing command.
   35.77 @@ -217,8 +217,8 @@
   35.78      /// This function issues a new <i> attribute writing command</i> 
   35.79      /// to the writer.
   35.80      template <typename Value>
   35.81 -    GraphWriter& writeAttribute(std::string name, const Value& value) {
   35.82 -      attribute_writer.writeAttribute(name, value);
   35.83 +    GraphWriter& writeAttribute(std::string label, const Value& value) {
   35.84 +      attribute_writer.writeAttribute(label, value);
   35.85        return *this;
   35.86      }
   35.87      
   35.88 @@ -226,10 +226,10 @@
   35.89      ///
   35.90      /// This function issues a new <i> attribute writing command</i> 
   35.91      /// to the writer.
   35.92 -    template <typename Writer, typename Value>
   35.93 -    GraphWriter& writeAttribute(std::string name, const Value& value, 
   35.94 -			       const Writer& writer) {
   35.95 -      attribute_writer.writeAttribute<Writer>(name, value, writer);
   35.96 +    template <typename ItemWriter, typename Value>
   35.97 +    GraphWriter& writeAttribute(std::string label, const Value& value, 
   35.98 +			       const ItemWriter& iw = ItemWriter()) {
   35.99 +      attribute_writer.writeAttribute(label, value, iw);
  35.100        return *this;
  35.101      }
  35.102  
  35.103 @@ -412,8 +412,8 @@
  35.104      /// This function issues a new <i> node map writing command</i> to
  35.105      /// the writer.
  35.106      template <typename Map>
  35.107 -    UGraphWriter& writeNodeMap(std::string name, const Map& map) {
  35.108 -      nodeset_writer.writeNodeMap(name, map);
  35.109 +    UGraphWriter& writeNodeMap(std::string label, const Map& map) {
  35.110 +      nodeset_writer.writeNodeMap(label, map);
  35.111        return *this;
  35.112      }
  35.113  
  35.114 @@ -421,10 +421,10 @@
  35.115      ///
  35.116      /// This function issues a new <i> node map writing command</i> to
  35.117      /// the writer.
  35.118 -    template <typename Writer, typename Map>
  35.119 -    UGraphWriter& writeNodeMap(std::string name, const Map& map, 
  35.120 -			      const Writer& writer = Writer()) {
  35.121 -      nodeset_writer.writeNodeMap(name, map, writer);
  35.122 +    template <typename ItemWriter, typename Map>
  35.123 +    UGraphWriter& writeNodeMap(std::string label, const Map& map, 
  35.124 +			      const ItemWriter& iw = ItemWriter()) {
  35.125 +      nodeset_writer.writeNodeMap(label, map, iw);
  35.126        return *this;
  35.127      }
  35.128  
  35.129 @@ -433,8 +433,8 @@
  35.130      /// This function issues a new <i> edge map writing command</i> to
  35.131      /// the writer.
  35.132      template <typename Map>
  35.133 -    UGraphWriter& writeEdgeMap(std::string name, const Map& map) { 
  35.134 -      u_edgeset_writer.writeEdgeMap(name, map);
  35.135 +    UGraphWriter& writeEdgeMap(std::string label, const Map& map) { 
  35.136 +      u_edgeset_writer.writeEdgeMap(label, map);
  35.137        return *this;
  35.138      }
  35.139  
  35.140 @@ -442,10 +442,10 @@
  35.141      ///
  35.142      /// This function issues a new <i> edge map writing command</i> to
  35.143      /// the writer.
  35.144 -    template <typename Writer, typename Map>
  35.145 -    UGraphWriter& writeEdgeMap(std::string name, const Map& map,
  35.146 -				   const Writer& writer = Writer()) {
  35.147 -      u_edgeset_writer.writeEdgeMap(name, map, writer);
  35.148 +    template <typename ItemWriter, typename Map>
  35.149 +    UGraphWriter& writeEdgeMap(std::string label, const Map& map,
  35.150 +				   const ItemWriter& iw = ItemWriter()) {
  35.151 +      u_edgeset_writer.writeEdgeMap(label, map, iw);
  35.152        return *this;
  35.153      }
  35.154  
  35.155 @@ -454,8 +454,8 @@
  35.156      /// This function issues a new <i> undirected edge map writing
  35.157      /// command</i> to the writer.
  35.158      template <typename Map>
  35.159 -    UGraphWriter& writeUEdgeMap(std::string name, const Map& map) { 
  35.160 -      u_edgeset_writer.writeUEdgeMap(name, map);
  35.161 +    UGraphWriter& writeUEdgeMap(std::string label, const Map& map) { 
  35.162 +      u_edgeset_writer.writeUEdgeMap(label, map);
  35.163        return *this;
  35.164      }
  35.165  
  35.166 @@ -463,10 +463,10 @@
  35.167      ///
  35.168      /// This function issues a new <i> undirected edge map writing
  35.169      /// command</i> to the writer.
  35.170 -   template <typename Writer, typename Map>
  35.171 -    UGraphWriter& writeUEdgeMap(std::string name, const Map& map,
  35.172 -					const Writer& writer = Writer()) {
  35.173 -      u_edgeset_writer.writeUEdgeMap(name, map, writer);
  35.174 +   template <typename ItemWriter, typename Map>
  35.175 +    UGraphWriter& writeUEdgeMap(std::string label, const Map& map,
  35.176 +					const ItemWriter& iw = ItemWriter()) {
  35.177 +      u_edgeset_writer.writeUEdgeMap(label, map, iw);
  35.178        return *this;
  35.179      }
  35.180  
  35.181 @@ -474,8 +474,8 @@
  35.182      ///
  35.183      /// This function issues a new <i> labeled node writing
  35.184      /// command</i> to the writer.
  35.185 -    UGraphWriter& writeNode(std::string name, const Node& node) {
  35.186 -      node_writer.writeNode(name, node);
  35.187 +    UGraphWriter& writeNode(std::string label, const Node& node) {
  35.188 +      node_writer.writeNode(label, node);
  35.189        return *this;
  35.190      }
  35.191  
  35.192 @@ -483,8 +483,8 @@
  35.193      ///
  35.194      /// This function issues a new <i> labeled edge writing
  35.195      /// command</i> to the writer.
  35.196 -    UGraphWriter& writeEdge(std::string name, const Edge& edge) {
  35.197 -      u_edge_writer.writeEdge(name, edge);
  35.198 +    UGraphWriter& writeEdge(std::string label, const Edge& edge) {
  35.199 +      u_edge_writer.writeEdge(label, edge);
  35.200      }
  35.201  
  35.202      /// \brief Issue a new labeled undirected edge writing command to
  35.203 @@ -492,8 +492,8 @@
  35.204      ///
  35.205      /// Issue a new <i>labeled undirected edge writing command</i> to
  35.206      /// the writer.
  35.207 -    UGraphWriter& writeUEdge(std::string name, const UEdge& edge) {
  35.208 -      u_edge_writer.writeUEdge(name, edge);
  35.209 +    UGraphWriter& writeUEdge(std::string label, const UEdge& edge) {
  35.210 +      u_edge_writer.writeUEdge(label, edge);
  35.211      }
  35.212  
  35.213      /// \brief Issue a new attribute writing command.
  35.214 @@ -501,8 +501,8 @@
  35.215      /// This function issues a new <i> attribute writing
  35.216      /// command</i> to the writer.
  35.217      template <typename Value>
  35.218 -    UGraphWriter& writeAttribute(std::string name, const Value& value) {
  35.219 -      attribute_writer.writeAttribute(name, value);
  35.220 +    UGraphWriter& writeAttribute(std::string label, const Value& value) {
  35.221 +      attribute_writer.writeAttribute(label, value);
  35.222        return *this;
  35.223      }
  35.224      
  35.225 @@ -510,10 +510,10 @@
  35.226      ///
  35.227      /// This function issues a new <i> attribute writing
  35.228      /// command</i> to the writer.
  35.229 -    template <typename Writer, typename Value>
  35.230 -    UGraphWriter& writeAttribute(std::string name, const Value& value, 
  35.231 -			       const Writer& writer) {
  35.232 -      attribute_writer.writeAttribute<Writer>(name, value, writer);
  35.233 +    template <typename ItemWriter, typename Value>
  35.234 +    UGraphWriter& writeAttribute(std::string label, const Value& value, 
  35.235 +			       const ItemWriter& iw = ItemWriter()) {
  35.236 +      attribute_writer.writeAttribute(label, value, iw);
  35.237        return *this;
  35.238      }
  35.239  
    36.1 --- a/lemon/grid_ugraph.h	Fri Mar 02 17:56:22 2007 +0000
    36.2 +++ b/lemon/grid_ugraph.h	Fri Mar 02 18:04:28 2007 +0000
    36.3 @@ -49,10 +49,10 @@
    36.4  
    36.5    protected:
    36.6  
    36.7 -    void construct(int width, int height) {
    36.8 -      _height = height; _width = width;
    36.9 -      _nodeNum = height * width; _edgeNum = 2 * _nodeNum - width - height;
   36.10 -      _edgeLimit = _nodeNum - width;
   36.11 +    void construct(int w, int h) {
   36.12 +      _height = h; _width = w;
   36.13 +      _nodeNum = h * w; _edgeNum = 2 * _nodeNum - w - h;
   36.14 +      _edgeLimit = _nodeNum - w;
   36.15      }
   36.16  
   36.17      Edge _down(Node n) const {
    37.1 --- a/lemon/hao_orlin.h	Fri Mar 02 17:56:22 2007 +0000
    37.2 +++ b/lemon/hao_orlin.h	Fri Mar 02 18:04:28 2007 +0000
    37.3 @@ -197,7 +197,6 @@
    37.4      
    37.5      template <typename ResGraph>
    37.6      void findMinCut(const Node& target, bool out, ResGraph& res_graph) {
    37.7 -      typedef typename Graph::Node Node;
    37.8        typedef typename ResGraph::Edge ResEdge;
    37.9        typedef typename ResGraph::OutEdgeIt ResOutEdgeIt;
   37.10  
   37.11 @@ -327,7 +326,7 @@
   37.12        --_level_size[(*_dist)[_target]];
   37.13        _dormant[0].push_front(_target);
   37.14        (*_source_set)[_target] = true;
   37.15 -      if ((int)_dormant[0].size() == _node_num){
   37.16 +      if (int(_dormant[0].size()) == _node_num){
   37.17          _dormant[0].clear();
   37.18  	return false;
   37.19        }
    38.1 --- a/lemon/hypercube_graph.h	Fri Mar 02 17:56:22 2007 +0000
    38.2 +++ b/lemon/hypercube_graph.h	Fri Mar 02 18:04:28 2007 +0000
    38.3 @@ -154,7 +154,7 @@
    38.4      }
    38.5  
    38.6      bool projection(Node node, int n) const {
    38.7 -      return (bool)(node.id & (1 << n));
    38.8 +      return static_cast<bool>(node.id & (1 << n));
    38.9      }
   38.10  
   38.11      int dimension(Edge edge) const {
   38.12 @@ -165,8 +165,8 @@
   38.13        return node.id;
   38.14      }
   38.15  
   38.16 -    Node operator()(int index) const {
   38.17 -      return Node(index);
   38.18 +    Node operator()(int ix) const {
   38.19 +      return Node(ix);
   38.20      }
   38.21      
   38.22    private:
   38.23 @@ -236,8 +236,8 @@
   38.24      /// \brief Gives back the node by its index.
   38.25      ///
   38.26      /// Gives back the node by its index.
   38.27 -    Node operator()(int index) const {
   38.28 -      return Parent::operator()(index);
   38.29 +    Node operator()(int ix) const {
   38.30 +      return Parent::operator()(ix);
   38.31      }
   38.32  
   38.33      /// \brief Number of nodes.
    39.1 --- a/lemon/iterable_maps.h	Fri Mar 02 17:56:22 2007 +0000
    39.2 +++ b/lemon/iterable_maps.h	Fri Mar 02 18:04:28 2007 +0000
    39.3 @@ -97,7 +97,7 @@
    39.4      public:
    39.5  
    39.6        Reference& operator=(const Reference& value) {
    39.7 -	_map.set(_key, (bool)value);
    39.8 +	_map.set(_key, static_cast<bool>(value));
    39.9   	return *this;
   39.10        }
   39.11  
   39.12 @@ -247,7 +247,7 @@
   39.13        /// keys which mapped to false.
   39.14        /// \param _map The IterableIntMap
   39.15        explicit FalseIt(const IterableBoolMap& _map) 
   39.16 -        : Parent(_map.sep < (int)_map.array.size() ? 
   39.17 +        : Parent(_map.sep < int(_map.array.size()) ? 
   39.18                   _map.array.back() : INVALID), map(&_map) {}
   39.19  
   39.20        /// \brief Invalid constructor \& conversion.
   39.21 @@ -288,7 +288,7 @@
   39.22        /// \param value Which elements should be iterated.
   39.23        ItemIt(const IterableBoolMap& _map, bool value) 
   39.24          : Parent(value ? (_map.sep > 0 ? _map.array[_map.sep - 1] : INVALID) :
   39.25 -                 (_map.sep < (int)_map.array.size() ? 
   39.26 +                 (_map.sep < int(_map.array.size()) ? 
   39.27                    _map.array.back() : INVALID)), map(&_map) {}
   39.28  
   39.29        /// \brief Invalid constructor \& conversion.
   39.30 @@ -321,7 +321,7 @@
   39.31  
   39.32      virtual void add(const std::vector<Key>& keys) {
   39.33        Parent::add(keys);
   39.34 -      for (int i = 0; i < (int)keys.size(); ++i) {
   39.35 +      for (int i = 0; i < int(keys.size()); ++i) {
   39.36          Parent::set(keys[i], array.size());
   39.37          array.push_back(keys[i]);
   39.38        }
   39.39 @@ -345,7 +345,7 @@
   39.40      }
   39.41  
   39.42      virtual void erase(const std::vector<Key>& keys) {
   39.43 -      for (int i = 0; i < (int)keys.size(); ++i) {
   39.44 +      for (int i = 0; i < int(keys.size()); ++i) {
   39.45          int pos = position(keys[i]); 
   39.46          if (pos < sep) {
   39.47            --sep;
   39.48 @@ -456,7 +456,7 @@
   39.49      void lace(const Key& key) {
   39.50        typename Parent::Value& node = Parent::operator[](key);
   39.51        if (node.value < 0) return;
   39.52 -      if (node.value >= (int)first.size()) {
   39.53 +      if (node.value >= int(first.size())) {
   39.54  	first.resize(node.value + 1, INVALID);
   39.55        } 
   39.56        node.prev = INVALID;
   39.57 @@ -484,7 +484,7 @@
   39.58      public:
   39.59  
   39.60        Reference& operator=(const Reference& value) {
   39.61 -	_map.set(_key, (const int&)value);
   39.62 +	_map.set(_key, static_cast<const int&>(value));
   39.63   	return *this;
   39.64        }
   39.65  
   39.66 @@ -617,7 +617,7 @@
   39.67        /// \param map The IterableIntMap
   39.68        /// \param value The value
   39.69        ItemIt(const IterableIntMap& map, int value) : _map(&map) {
   39.70 -	if (value < 0 || value >= (int)_map->first.size()) {	  
   39.71 +	if (value < 0 || value >= int(_map->first.size())) {	  
   39.72  	  Parent::operator=(INVALID);
   39.73  	} else {
   39.74  	  Parent::operator=(_map->first[value]);
   39.75 @@ -646,7 +646,7 @@
   39.76      }
   39.77  
   39.78      virtual void erase(const std::vector<Key>& keys) {
   39.79 -      for (int i = 0; i < (int)keys.size(); ++i) {
   39.80 +      for (int i = 0; i < int(keys.size()); ++i) {
   39.81          unlace(keys[i]);
   39.82        }
   39.83        Parent::erase(keys);
   39.84 @@ -884,7 +884,7 @@
   39.85  
   39.86      virtual void add(const std::vector<Key>& keys) {
   39.87        Parent::add(keys);
   39.88 -      for (int i = 0; i < (int)keys.size(); ++i) {
   39.89 +      for (int i = 0; i < int(keys.size()); ++i) {
   39.90          lace(keys[i]);
   39.91        }
   39.92      }
   39.93 @@ -895,7 +895,7 @@
   39.94      }
   39.95  
   39.96      virtual void erase(const std::vector<Key>& keys) {
   39.97 -      for (int i = 0; i < (int)keys.size(); ++i) {
   39.98 +      for (int i = 0; i < int(keys.size()); ++i) {
   39.99          unlace(keys[i]);
  39.100        }
  39.101        Parent::erase(keys);
    40.1 --- a/lemon/johnson.h	Fri Mar 02 17:56:22 2007 +0000
    40.2 +++ b/lemon/johnson.h	Fri Mar 02 18:04:28 2007 +0000
    40.3 @@ -563,9 +563,9 @@
    40.4        
    40.5        BellmanFordType bellmanford(*graph, *length);
    40.6  
    40.7 -      NullMap<Node, Edge> predMap;
    40.8 +      NullMap<Node, Edge> pm;
    40.9  
   40.10 -      bellmanford.predMap(predMap);
   40.11 +      bellmanford.predMap(pm);
   40.12        
   40.13        bellmanford.init(OperationTraits::zero());
   40.14        bellmanford.start();
   40.15 @@ -590,9 +590,9 @@
   40.16  
   40.17        BellmanFordType bellmanford(*graph, *length);
   40.18  
   40.19 -      NullMap<Node, Edge> predMap;
   40.20 +      NullMap<Node, Edge> pm;
   40.21  
   40.22 -      bellmanford.predMap(predMap);
   40.23 +      bellmanford.predMap(pm);
   40.24        
   40.25        bellmanford.init(OperationTraits::zero());
   40.26        if (!bellmanford.checkedStart()) return false;
    41.1 --- a/lemon/kruskal.h	Fri Mar 02 17:56:22 2007 +0000
    41.2 +++ b/lemon/kruskal.h	Fri Mar 02 18:04:28 2007 +0000
    41.3 @@ -102,8 +102,9 @@
    41.4  // 	  ,typename OUT::Key = OUT::Key()
    41.5  // 	  //,typename OUT::Key = typename GR::Edge()
    41.6  	  const typename IN::value_type::first_type * = 
    41.7 -	  (const typename IN::value_type::first_type *)(0),
    41.8 -	  const typename OUT::Key * = (const typename OUT::Key *)(0)
    41.9 +	  reinterpret_cast<const typename IN::value_type::first_type*>(0),
   41.10 +	  const typename OUT::Key * = 
   41.11 +          reinterpret_cast<const typename OUT::Key*>(0)
   41.12  	  )
   41.13  #endif
   41.14    {
   41.15 @@ -170,8 +171,9 @@
   41.16  // 	  typename IN::value_type::first_type = typename GR::Edge(),
   41.17  // 	  typename OUT::Key = GR::Edge()
   41.18  	  const typename IN::value_type::first_type * = 
   41.19 -	  (const typename IN::value_type::first_type *)(0),
   41.20 -	  const typename OUT::Key * = (const typename OUT::Key *)(0)
   41.21 +	  reinterpret_cast<const typename IN::value_type::first_type*>(0),
   41.22 +	  const typename OUT::Key * = 
   41.23 +          reinterpret_cast<const typename OUT::Key*>(0)
   41.24  	  )
   41.25    {
   41.26      NonConstMapWr<OUT> map_wr(out_map);
   41.27 @@ -357,8 +359,10 @@
   41.28  	  //	  typename IN::Key = typename GR::Edge(),
   41.29  	  //typename IN::Key = typename IN::Key (),
   41.30  	  //	  typename RET::Key = typename GR::Edge()
   41.31 -	  const typename IN::Key *  = (const typename IN::Key *)(0),
   41.32 -	  const typename RET::Key * = (const typename RET::Key *)(0)
   41.33 +	  const typename IN::Key * = 
   41.34 +          reinterpret_cast<const typename IN::Key*>(0),
   41.35 +	  const typename RET::Key * = 
   41.36 +          reinterpret_cast<const typename RET::Key*>(0)
   41.37  	  )
   41.38    {
   41.39      return kruskal(g,
   41.40 @@ -407,7 +411,7 @@
   41.41  	  const IN& in,
   41.42  	  RET out,
   41.43  	  const typename RET::value_type * = 
   41.44 -	  (const typename RET::value_type *)(0)
   41.45 +	  reinterpret_cast<const typename RET::value_type*>(0)
   41.46  	  )
   41.47    {
   41.48      KruskalSequenceOutput<RET> _out(out);
    42.1 --- a/lemon/lemon_reader.h	Fri Mar 02 17:56:22 2007 +0000
    42.2 +++ b/lemon/lemon_reader.h	Fri Mar 02 18:04:28 2007 +0000
    42.3 @@ -533,7 +533,7 @@
    42.4    
    42.5        virtual std::streambuf* setbuf(char *buf, std::streamsize len) {
    42.6  	if (base()) return 0;
    42.7 -	if (buf != 0 && len >= (int)sizeof(small_buf)) {
    42.8 +	if (buf != 0 && len >= int(sizeof(small_buf))) {
    42.9  	  setb(buf, len);
   42.10  	} else {
   42.11  	  setb(small_buf, sizeof(small_buf));
   42.12 @@ -709,8 +709,8 @@
   42.13  	      char buf[2048];
   42.14  	      FilterStreamBuf buffer(*is, line_num);
   42.15  	      buffer.pubsetbuf(buf, sizeof(buf));
   42.16 -	      std::istream is(&buffer);
   42.17 -	      it->first->read(is);
   42.18 +	      std::istream ss(&buffer);
   42.19 +	      it->first->read(ss);
   42.20  	      break;
   42.21  	    }
   42.22  	  }
   42.23 @@ -797,51 +797,51 @@
   42.24      ///
   42.25      /// Add a new node map reader command for the reader.
   42.26      template <typename Map>
   42.27 -    NodeSetReader& readNodeMap(std::string name, Map& map) {
   42.28 +    NodeSetReader& readNodeMap(std::string label, Map& map) {
   42.29        return _readMap<
   42.30  	typename Traits::template Reader<typename Map::Value>, Map,
   42.31 -	typename _reader_bits::Arg<Map>::Type>(name, map);
   42.32 +	typename _reader_bits::Arg<Map>::Type>(label, map);
   42.33      }
   42.34  
   42.35      template <typename Map>
   42.36 -    NodeSetReader& readNodeMap(std::string name, const Map& map) {
   42.37 +    NodeSetReader& readNodeMap(std::string label, const Map& map) {
   42.38        return _readMap<
   42.39  	typename Traits::template Reader<typename Map::Value>, Map,
   42.40 -	typename _reader_bits::Arg<Map>::Type>(name, map);
   42.41 +	typename _reader_bits::Arg<Map>::Type>(label, map);
   42.42      }
   42.43  
   42.44      /// \brief Add a new node map reader command for the reader.
   42.45      ///
   42.46      /// Add a new node map reader command for the reader.
   42.47 -    template <typename Reader, typename Map>
   42.48 -    NodeSetReader& readNodeMap(std::string name, Map& map, 
   42.49 -			       const Reader& reader = Reader()) {
   42.50 -      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
   42.51 -	(name, map, reader);
   42.52 +    template <typename ItemReader, typename Map>
   42.53 +    NodeSetReader& readNodeMap(std::string label, Map& map, 
   42.54 +			       const ItemReader& ir = ItemReader()) {
   42.55 +      return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
   42.56 +	(label, map, ir);
   42.57      }
   42.58  
   42.59 -    template <typename Reader, typename Map>
   42.60 -    NodeSetReader& readNodeMap(std::string name, const Map& map, 
   42.61 -			       const Reader& reader = Reader()) {
   42.62 -      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
   42.63 -	(name, map, reader);
   42.64 +    template <typename ItemReader, typename Map>
   42.65 +    NodeSetReader& readNodeMap(std::string label, const Map& map, 
   42.66 +			       const ItemReader& ir = ItemReader()) {
   42.67 +      return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
   42.68 +	(label, map, ir);
   42.69      }
   42.70  
   42.71    private:
   42.72  
   42.73 -    template <typename Reader, typename Map, typename MapParameter>
   42.74 -    NodeSetReader& _readMap(std::string name, MapParameter map, 
   42.75 -			    const Reader& reader = Reader()) {
   42.76 +    template <typename ItemReader, typename Map, typename MapParameter>
   42.77 +    NodeSetReader& _readMap(std::string label, MapParameter map, 
   42.78 +			    const ItemReader& ir = ItemReader()) {
   42.79        checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>();
   42.80 -      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
   42.81 -      if (readers.find(name) != readers.end()) {
   42.82 +      checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
   42.83 +      if (readers.find(label) != readers.end()) {
   42.84  	ErrorMessage msg;
   42.85 -	msg << "Multiple read rule for node map: " << name;
   42.86 +	msg << "Multiple read rule for node map: " << label;
   42.87  	throw IoParameterError(msg.message());
   42.88        }      
   42.89        readers.insert(
   42.90 -        make_pair(name, new _reader_bits::
   42.91 -		  MapReader<Node, Map, Reader>(map, reader)));
   42.92 +        make_pair(label, new _reader_bits::
   42.93 +		  MapReader<Node, Map, ItemReader>(map, ir)));
   42.94        return *this;
   42.95      }
   42.96  
   42.97 @@ -850,16 +850,16 @@
   42.98      /// \brief Add a new node map skipper command for the reader.
   42.99      ///
  42.100      /// Add a new node map skipper command for the reader.
  42.101 -    template <typename Reader>
  42.102 -    NodeSetReader& skipNodeMap(std::string name, 
  42.103 -			   const Reader& reader = Reader()) {
  42.104 -      if (readers.find(name) != readers.end()) {
  42.105 +    template <typename ItemReader>
  42.106 +    NodeSetReader& skipNodeMap(std::string label, 
  42.107 +                               const ItemReader& ir = ItemReader()) {
  42.108 +      if (readers.find(label) != readers.end()) {
  42.109  	ErrorMessage msg;
  42.110 -	msg << "Multiple read rule for node map: " << name;
  42.111 +	msg << "Multiple read rule for node map: " << label;
  42.112  	throw IoParameterError(msg.message());
  42.113        }
  42.114 -      readers.insert(make_pair(name, new _reader_bits::
  42.115 -			       SkipReader<Node, Reader>(reader)));
  42.116 +      readers.insert(make_pair(label, new _reader_bits::
  42.117 +			       SkipReader<Node, ItemReader>(ir)));
  42.118        return *this;
  42.119      }
  42.120  
  42.121 @@ -885,21 +885,23 @@
  42.122        std::vector<_reader_bits::MapReaderBase<Node>* > index;
  42.123        std::string line;
  42.124  
  42.125 -      getline(is, line);
  42.126 -      std::istringstream ls(line);
  42.127 -      std::string id;
  42.128 -      while (ls >> id) {
  42.129 -	typename MapReaders::iterator it = readers.find(id);
  42.130 -	if (it != readers.end()) {
  42.131 -	  it->second->touch();
  42.132 -	  index.push_back(it->second);
  42.133 -	} else {
  42.134 -	  index.push_back(&skipper);
  42.135 -	}
  42.136 -	if (id == "label") {
  42.137 -	  inverter.reset(index.back()->getInverter());
  42.138 -	  index.back() = inverter.get();
  42.139 -	}
  42.140 +      {
  42.141 +        getline(is, line);
  42.142 +        std::istringstream ls(line);
  42.143 +        std::string id;
  42.144 +        while (ls >> id) {
  42.145 +          typename MapReaders::iterator it = readers.find(id);
  42.146 +          if (it != readers.end()) {
  42.147 +            it->second->touch();
  42.148 +            index.push_back(it->second);
  42.149 +          } else {
  42.150 +            index.push_back(&skipper);
  42.151 +          }
  42.152 +          if (id == "label") {
  42.153 +            inverter.reset(index.back()->getInverter());
  42.154 +            index.back() = inverter.get();
  42.155 +          }
  42.156 +        }
  42.157        }
  42.158        for (typename MapReaders::iterator it = readers.begin();
  42.159  	   it != readers.end(); ++it) {
  42.160 @@ -912,7 +914,7 @@
  42.161        while (getline(is, line)) {	
  42.162  	Node node = graph.addNode();
  42.163  	std::istringstream ls(line);
  42.164 -	for (int i = 0; i < (int)index.size(); ++i) {
  42.165 +	for (int i = 0; i < int(index.size()); ++i) {
  42.166  	  index[i]->read(ls, node);
  42.167  	}
  42.168        }
  42.169 @@ -1027,51 +1029,51 @@
  42.170      ///
  42.171      /// Add a new edge map reader command for the reader.
  42.172      template <typename Map>
  42.173 -    EdgeSetReader& readEdgeMap(std::string name, Map& map) {
  42.174 +    EdgeSetReader& readEdgeMap(std::string label, Map& map) {
  42.175        return _readMap<
  42.176  	typename Traits::template Reader<typename Map::Value>, Map,
  42.177 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.178 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.179      }
  42.180  
  42.181      template <typename Map>
  42.182 -    EdgeSetReader& readEdgeMap(std::string name, const Map& map) {
  42.183 +    EdgeSetReader& readEdgeMap(std::string label, const Map& map) {
  42.184        return _readMap<
  42.185  	typename Traits::template Reader<typename Map::Value>, Map,
  42.186 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.187 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.188      }
  42.189  
  42.190      /// \brief Add a new edge map reader command for the reader.
  42.191      ///
  42.192      /// Add a new edge map reader command for the reader.
  42.193 -    template <typename Reader, typename Map>
  42.194 -    EdgeSetReader& readEdgeMap(std::string name, Map& map, 
  42.195 -			   const Reader& reader = Reader()) {
  42.196 -      return _readMap<Reader, Map,
  42.197 -	typename _reader_bits::Arg<Map>::Type>(name, map, reader);
  42.198 +    template <typename ItemReader, typename Map>
  42.199 +    EdgeSetReader& readEdgeMap(std::string label, Map& map, 
  42.200 +                               const ItemReader& ir = ItemReader()) {
  42.201 +      return _readMap<ItemReader, Map,
  42.202 +	typename _reader_bits::Arg<Map>::Type>(label, map, ir);
  42.203      }
  42.204  
  42.205 -    template <typename Reader, typename Map>
  42.206 -    EdgeSetReader& readEdgeMap(std::string name, const Map& map, 
  42.207 -			       const Reader& reader = Reader()) {
  42.208 -      return _readMap<Reader, Map,
  42.209 -	typename _reader_bits::Arg<Map>::Type>(name, map, reader);
  42.210 +    template <typename ItemReader, typename Map>
  42.211 +    EdgeSetReader& readEdgeMap(std::string label, const Map& map, 
  42.212 +			       const ItemReader& ir = ItemReader()) {
  42.213 +      return _readMap<ItemReader, Map,
  42.214 +	typename _reader_bits::Arg<Map>::Type>(label, map, ir);
  42.215      }
  42.216  
  42.217    private:
  42.218  
  42.219 -    template <typename Reader, typename Map, typename MapParameter>
  42.220 -    EdgeSetReader& _readMap(std::string name, MapParameter map, 
  42.221 -			    const Reader& reader = Reader()) {
  42.222 +    template <typename ItemReader, typename Map, typename MapParameter>
  42.223 +    EdgeSetReader& _readMap(std::string label, MapParameter map, 
  42.224 +			    const ItemReader& ir = ItemReader()) {
  42.225        checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
  42.226 -      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
  42.227 -      if (readers.find(name) != readers.end()) {
  42.228 +      checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
  42.229 +      if (readers.find(label) != readers.end()) {
  42.230  	ErrorMessage msg;
  42.231 -	msg << "Multiple read rule for edge map: " << name;
  42.232 +	msg << "Multiple read rule for edge map: " << label;
  42.233  	throw IoParameterError(msg.message());
  42.234        }
  42.235        readers.insert(
  42.236 -	make_pair(name, new _reader_bits::
  42.237 -		  MapReader<Edge, Map, Reader>(map, reader)));
  42.238 +	make_pair(label, new _reader_bits::
  42.239 +		  MapReader<Edge, Map, ItemReader>(map, ir)));
  42.240        return *this;
  42.241      }
  42.242  
  42.243 @@ -1080,16 +1082,16 @@
  42.244      /// \brief Add a new edge map skipper command for the reader.
  42.245      ///
  42.246      /// Add a new edge map skipper command for the reader.
  42.247 -    template <typename Reader>
  42.248 -    EdgeSetReader& skipEdgeMap(std::string name, 
  42.249 -			       const Reader& reader = Reader()) {
  42.250 -      if (readers.find(name) != readers.end()) {
  42.251 +    template <typename ItemReader>
  42.252 +    EdgeSetReader& skipEdgeMap(std::string label, 
  42.253 +			       const ItemReader& ir = ItemReader()) {
  42.254 +      if (readers.find(label) != readers.end()) {
  42.255  	ErrorMessage msg;
  42.256 -	msg << "Multiple read rule for edge map: " << name;
  42.257 +	msg << "Multiple read rule for edge map: " << label;
  42.258  	throw IoParameterError(msg.message());
  42.259        }
  42.260 -      readers.insert(make_pair(name, new _reader_bits::
  42.261 -			       SkipReader<Edge, Reader>(reader)));
  42.262 +      readers.insert(make_pair(label, new _reader_bits::
  42.263 +			       SkipReader<Edge, ItemReader>(ir)));
  42.264        return *this;
  42.265      }
  42.266  
  42.267 @@ -1118,21 +1120,23 @@
  42.268        std::vector<_reader_bits::MapReaderBase<Edge>* > index;
  42.269        std::string line;
  42.270  
  42.271 -      getline(is, line);
  42.272 -      std::istringstream ls(line);	
  42.273 -      std::string id;
  42.274 -      while (ls >> id) {
  42.275 -	typename MapReaders::iterator it = readers.find(id);
  42.276 -	if (it != readers.end()) {
  42.277 -	  index.push_back(it->second);
  42.278 -	  it->second->touch();
  42.279 -	} else {
  42.280 -	  index.push_back(&skipper);
  42.281 -	}
  42.282 -	if (id == "label") {
  42.283 -	  inverter.reset(index.back()->getInverter());
  42.284 -	  index.back() = inverter.get();
  42.285 -	}
  42.286 +      {
  42.287 +        getline(is, line);
  42.288 +        std::istringstream ls(line);	
  42.289 +        std::string id;
  42.290 +        while (ls >> id) {
  42.291 +          typename MapReaders::iterator it = readers.find(id);
  42.292 +          if (it != readers.end()) {
  42.293 +            index.push_back(it->second);
  42.294 +            it->second->touch();
  42.295 +          } else {
  42.296 +            index.push_back(&skipper);
  42.297 +          }
  42.298 +          if (id == "label") {
  42.299 +            inverter.reset(index.back()->getInverter());
  42.300 +            index.back() = inverter.get();
  42.301 +          }
  42.302 +        }
  42.303        }
  42.304        for (typename MapReaders::iterator it = readers.begin();
  42.305  	   it != readers.end(); ++it) {
  42.306 @@ -1147,7 +1151,7 @@
  42.307  	Node from = nodeLabelReader->read(ls);
  42.308  	Node to = nodeLabelReader->read(ls);
  42.309  	Edge edge = graph.addEdge(from, to);
  42.310 -	for (int i = 0; i < (int)index.size(); ++i) {
  42.311 +	for (int i = 0; i < int(index.size()); ++i) {
  42.312  	  index[i]->read(ls, edge);
  42.313  	}
  42.314        }
  42.315 @@ -1271,51 +1275,51 @@
  42.316      ///
  42.317      /// Add a new edge undirected map reader command for the reader.
  42.318      template <typename Map>
  42.319 -    UEdgeSetReader& readUEdgeMap(std::string name, Map& map) {
  42.320 +    UEdgeSetReader& readUEdgeMap(std::string label, Map& map) {
  42.321        return _readMap<
  42.322  	typename Traits::template Reader<typename Map::Value>, Map, 
  42.323 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.324 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.325      }
  42.326  
  42.327      template <typename Map>
  42.328 -    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map) {
  42.329 +    UEdgeSetReader& readUEdgeMap(std::string label, const Map& map) {
  42.330        return _readMap<
  42.331  	typename Traits::template Reader<typename Map::Value>, Map, 
  42.332 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.333 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.334      }
  42.335  
  42.336      /// \brief Add a new undirected edge map reader command for the reader.
  42.337      ///
  42.338      /// Add a new edge undirected map reader command for the reader.
  42.339 -    template <typename Reader, typename Map>
  42.340 -    UEdgeSetReader& readUEdgeMap(std::string name, Map& map, 
  42.341 -					 const Reader& reader = Reader()) {
  42.342 -      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  42.343 -	(name, map, reader);
  42.344 +    template <typename ItemReader, typename Map>
  42.345 +    UEdgeSetReader& readUEdgeMap(std::string label, Map& map, 
  42.346 +                                 const ItemReader& ir = ItemReader()) {
  42.347 +      return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type>
  42.348 +	(label, map, ir);
  42.349      }
  42.350  
  42.351 -    template <typename Reader, typename Map>
  42.352 -    UEdgeSetReader& readUEdgeMap(std::string name, const Map& map, 
  42.353 -					 const Reader& reader = Reader()) {
  42.354 -      return _readMap<Reader, Map, typename _reader_bits::Arg<Map>::Type >
  42.355 -	(name, map, reader);
  42.356 +    template <typename ItemReader, typename Map>
  42.357 +    UEdgeSetReader& readUEdgeMap(std::string label, const Map& map, 
  42.358 +                                 const ItemReader& ir = ItemReader()) {
  42.359 +      return _readMap<ItemReader, Map, typename _reader_bits::Arg<Map>::Type >
  42.360 +	(label, map, ir);
  42.361      }
  42.362  
  42.363    private:
  42.364  
  42.365 -    template <typename Reader, typename Map, typename MapParameter>
  42.366 -    UEdgeSetReader& _readMap(std::string name, MapParameter map,
  42.367 -				 const Reader& reader = Reader()) {
  42.368 +    template <typename ItemReader, typename Map, typename MapParameter>
  42.369 +    UEdgeSetReader& _readMap(std::string label, MapParameter map,
  42.370 +                             const ItemReader& ir = ItemReader()) {
  42.371        checkConcept<concepts::WriteMap<UEdge, typename Map::Value>, Map>();
  42.372 -      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
  42.373 -      if (readers.find(name) != readers.end()) {
  42.374 +      checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
  42.375 +      if (readers.find(label) != readers.end()) {
  42.376  	ErrorMessage msg;
  42.377 -	msg << "Multiple read rule for edge map: " << name;
  42.378 +	msg << "Multiple read rule for edge map: " << label;
  42.379  	throw IoParameterError(msg.message());
  42.380        }
  42.381        readers.insert(
  42.382 -	make_pair(name, new _reader_bits::
  42.383 -		  MapReader<UEdge, Map, Reader>(map, reader)));
  42.384 +	make_pair(label, new _reader_bits::
  42.385 +		  MapReader<UEdge, Map, ItemReader>(map, ir)));
  42.386        return *this;
  42.387      }
  42.388  
  42.389 @@ -1324,16 +1328,16 @@
  42.390      /// \brief Add a new undirected edge map skipper command for the reader.
  42.391      ///
  42.392      /// Add a new undirected edge map skipper command for the reader.
  42.393 -    template <typename Reader>
  42.394 -    UEdgeSetReader& skipUEdgeMap(std::string name, 
  42.395 -					 const Reader& reader = Reader()) {
  42.396 -      if (readers.find(name) != readers.end()) {
  42.397 +    template <typename ItemReader>
  42.398 +    UEdgeSetReader& skipUEdgeMap(std::string label, 
  42.399 +                                 const ItemReader& ir = ItemReader()) {
  42.400 +      if (readers.find(label) != readers.end()) {
  42.401  	ErrorMessage msg;
  42.402 -	msg << "Multiple read rule for node map: " << name;
  42.403 +	msg << "Multiple read rule for node map: " << label;
  42.404  	throw IoParameterError(msg.message());
  42.405        }
  42.406 -      readers.insert(make_pair(name, new _reader_bits::
  42.407 -			       SkipReader<UEdge, Reader>(reader)));
  42.408 +      readers.insert(make_pair(label, new _reader_bits::
  42.409 +			       SkipReader<UEdge, ItemReader>(ir)));
  42.410        return *this;
  42.411      }
  42.412  
  42.413 @@ -1341,47 +1345,47 @@
  42.414      ///
  42.415      /// Add a new directed edge map reader command for the reader.
  42.416      template <typename Map>
  42.417 -    UEdgeSetReader& readEdgeMap(std::string name, Map& map) {
  42.418 +    UEdgeSetReader& readEdgeMap(std::string label, Map& map) {
  42.419        return _readDirMap<
  42.420  	typename Traits::template Reader<typename Map::Value>, Map,
  42.421 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.422 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.423      }
  42.424  
  42.425      template <typename Map>
  42.426 -    UEdgeSetReader& readEdgeMap(std::string name, const Map& map) {
  42.427 +    UEdgeSetReader& readEdgeMap(std::string label, const Map& map) {
  42.428        return _readDirMap<
  42.429  	typename Traits::template Reader<typename Map::Value>, Map,
  42.430 -	typename _reader_bits::Arg<Map>::Type>(name, map);
  42.431 +	typename _reader_bits::Arg<Map>::Type>(label, map);
  42.432      }
  42.433  
  42.434      /// \brief Add a new directed edge map reader command for the reader.
  42.435      ///
  42.436      /// Add a new directed edge map reader command for the reader.
  42.437 -    template <typename Reader, typename Map>
  42.438 -    UEdgeSetReader& readEdgeMap(std::string name, Map& map, 
  42.439 -				    const Reader& reader = Reader()) {
  42.440 -      return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  42.441 -	(name, map, reader);
  42.442 +    template <typename ItemReader, typename Map>
  42.443 +    UEdgeSetReader& readEdgeMap(std::string label, Map& map, 
  42.444 +				    const ItemReader& ir = ItemReader()) {
  42.445 +      return _readDirMap<ItemReader, Map, 
  42.446 +        typename _reader_bits::Arg<Map>::Type>(label, map, ir);
  42.447      }
  42.448  
  42.449 -    template <typename Reader, typename Map>
  42.450 -    UEdgeSetReader& readEdgeMap(std::string name, const Map& map, 
  42.451 -				    const Reader& reader = Reader()) {
  42.452 -      return _readDirMap<Reader, Map, typename _reader_bits::Arg<Map>::Type>
  42.453 -	(name, map, reader);
  42.454 +    template <typename ItemReader, typename Map>
  42.455 +    UEdgeSetReader& readEdgeMap(std::string label, const Map& map, 
  42.456 +				    const ItemReader& ir = ItemReader()) {
  42.457 +      return _readDirMap<ItemReader, Map, 
  42.458 +        typename _reader_bits::Arg<Map>::Type>(label, map, ir);
  42.459      }
  42.460  
  42.461    private:
  42.462  
  42.463 -    template <typename Reader, typename Map, typename MapParameter>
  42.464 -    UEdgeSetReader& _readDirMap(std::string name, MapParameter map,
  42.465 -				    const Reader& reader = Reader()) { 
  42.466 -      checkConcept<_reader_bits::ItemReader<typename Map::Value>, Reader>();
  42.467 +    template <typename ItemReader, typename Map, typename MapParameter>
  42.468 +    UEdgeSetReader& _readDirMap(std::string label, MapParameter map,
  42.469 +				    const ItemReader& ir = ItemReader()) { 
  42.470 +      checkConcept<_reader_bits::ItemReader<typename Map::Value>, ItemReader>();
  42.471        checkConcept<concepts::WriteMap<Edge, typename Map::Value>, Map>();
  42.472 -      readUEdgeMap("+" + name, 
  42.473 -                   _reader_bits::forwardComposeMap(graph, map), reader);
  42.474 -      readUEdgeMap("-" + name, 
  42.475 -                   _reader_bits::backwardComposeMap(graph, map), reader);
  42.476 +      readUEdgeMap("+" + label, 
  42.477 +                   _reader_bits::forwardComposeMap(graph, map), ir);
  42.478 +      readUEdgeMap("-" + label, 
  42.479 +                   _reader_bits::backwardComposeMap(graph, map), ir);
  42.480        return *this;      
  42.481      }
  42.482  
  42.483 @@ -1390,11 +1394,11 @@
  42.484      /// \brief Add a new directed edge map skipper command for the reader.
  42.485      ///
  42.486      /// Add a new directed edge map skipper command for the reader.
  42.487 -    template <typename Reader>
  42.488 -    UEdgeSetReader& skipEdgeMap(std::string name, 
  42.489 -                                const Reader& reader = Reader()) {
  42.490 -      skipUEdgeMap("+" + name, reader);
  42.491 -      skipUEdgeMap("-" + name, reader);
  42.492 +    template <typename ItemReader>
  42.493 +    UEdgeSetReader& skipEdgeMap(std::string label, 
  42.494 +                                const ItemReader& ir = ItemReader()) {
  42.495 +      skipUEdgeMap("+" + label, ir);
  42.496 +      skipUEdgeMap("-" + label, ir);
  42.497        return *this;
  42.498      }
  42.499  
  42.500 @@ -1423,36 +1427,38 @@
  42.501        std::vector<_reader_bits::MapReaderBase<UEdge>* > index;
  42.502        std::string line;
  42.503  
  42.504 -      getline(is, line);
  42.505 -      std::istringstream ls(line);	
  42.506 -      std::string id;
  42.507 -      while (ls >> id) {
  42.508 -	typename MapReaders::iterator it = readers.find(id);
  42.509 -	if (it != readers.end()) {
  42.510 -	  index.push_back(it->second);
  42.511 -	  it->second->touch();
  42.512 -	} else {
  42.513 -	  index.push_back(&skipper);
  42.514 -	}
  42.515 -	if (id == "label") {
  42.516 -	  inverter.reset(index.back()->getInverter());
  42.517 -	  index.back() = inverter.get();
  42.518 -	}
  42.519 -      }
  42.520 -      for (typename MapReaders::iterator it = readers.begin();
  42.521 -	   it != readers.end(); ++it) {
  42.522 -	if (!it->second->touched()) {
  42.523 -	  ErrorMessage msg;
  42.524 -	  msg << "Map not found in file: " << it->first;
  42.525 -	  throw IoParameterError(msg.message());
  42.526 -	}
  42.527 +      {
  42.528 +        getline(is, line);
  42.529 +        std::istringstream ls(line);	
  42.530 +        std::string id;
  42.531 +        while (ls >> id) {
  42.532 +          typename MapReaders::iterator it = readers.find(id);
  42.533 +          if (it != readers.end()) {
  42.534 +            index.push_back(it->second);
  42.535 +            it->second->touch();
  42.536 +          } else {
  42.537 +            index.push_back(&skipper);
  42.538 +          }
  42.539 +          if (id == "label") {
  42.540 +            inverter.reset(index.back()->getInverter());
  42.541 +            index.back() = inverter.get();
  42.542 +          }
  42.543 +        }
  42.544 +        for (typename MapReaders::iterator it = readers.begin();
  42.545 +             it != readers.end(); ++it) {
  42.546 +          if (!it->second->touched()) {
  42.547 +            ErrorMessage msg;
  42.548 +            msg << "Map not found in file: " << it->first;
  42.549 +            throw IoParameterError(msg.message());
  42.550 +          }
  42.551 +        }
  42.552        }
  42.553        while (getline(is, line)) {	
  42.554  	std::istringstream ls(line);
  42.555  	Node from = nodeLabelReader->read(ls);
  42.556  	Node to = nodeLabelReader->read(ls);
  42.557  	UEdge edge = graph.addEdge(from, to);
  42.558 -	for (int i = 0; i < (int)index.size(); ++i) {
  42.559 +	for (int i = 0; i < int(index.size()); ++i) {
  42.560  	  index[i]->read(ls, edge);
  42.561  	}
  42.562        }
  42.563 @@ -1563,13 +1569,13 @@
  42.564      /// \brief Add a node reader command for the NodeReader.
  42.565      ///
  42.566      /// Add a node reader command for the NodeReader.
  42.567 -    void readNode(const std::string& name, Node& item) {
  42.568 -      if (readers.find(name) != readers.end()) {
  42.569 +    void readNode(std::string label, Node& item) {
  42.570 +      if (readers.find(label) != readers.end()) {
  42.571  	ErrorMessage msg;
  42.572 -	msg << "Multiple read rule for node: " << name;
  42.573 +	msg << "Multiple read rule for node: " << label;
  42.574  	throw IoParameterError(msg.message());
  42.575        }
  42.576 -      readers.insert(make_pair(name, _reader_bits::ItemStore<Node>(item)));
  42.577 +      readers.insert(make_pair(label, _reader_bits::ItemStore<Node>(item)));
  42.578      }
  42.579  
  42.580    protected:
  42.581 @@ -1676,13 +1682,13 @@
  42.582      /// \brief Add an edge reader command for the EdgeReader.
  42.583      ///
  42.584      /// Add an edge reader command for the EdgeReader.
  42.585 -    void readEdge(const std::string& name, Edge& item) {
  42.586 -      if (readers.find(name) != readers.end()) {
  42.587 +    void readEdge(std::string label, Edge& item) {
  42.588 +      if (readers.find(label) != readers.end()) {
  42.589  	ErrorMessage msg;
  42.590 -	msg << "Multiple read rule for edge: " << name;
  42.591 +	msg << "Multiple read rule for edge: " << label;
  42.592  	throw IoParameterError(msg.message());
  42.593        }
  42.594 -      readers.insert(make_pair(name, _reader_bits::ItemStore<Edge>(item)));
  42.595 +      readers.insert(make_pair(label, _reader_bits::ItemStore<Edge>(item)));
  42.596      }
  42.597  
  42.598    protected:
  42.599 @@ -1794,26 +1800,26 @@
  42.600      /// \brief Add an undirected edge reader command for the UEdgeReader.
  42.601      ///
  42.602      /// Add an undirected edge reader command for the UEdgeReader.
  42.603 -    void readUEdge(const std::string& name, UEdge& item) {
  42.604 -      if (uEdgeReaders.find(name) != uEdgeReaders.end()) {
  42.605 +    void readUEdge(std::string label, UEdge& item) {
  42.606 +      if (uEdgeReaders.find(label) != uEdgeReaders.end()) {
  42.607  	ErrorMessage msg;
  42.608 -	msg << "Multiple read rule for undirected edge: " << name;
  42.609 +	msg << "Multiple read rule for undirected edge: " << label;
  42.610  	throw IoParameterError(msg.message());
  42.611        }
  42.612 -      uEdgeReaders.insert(make_pair(name, _reader_bits::
  42.613 +      uEdgeReaders.insert(make_pair(label, _reader_bits::
  42.614  					ItemStore<UEdge>(item)));
  42.615      }
  42.616  
  42.617      /// \brief Add an edge reader command for the UEdgeReader.
  42.618      ///
  42.619      /// Add an edge reader command for the UEdgeReader.
  42.620 -    void readEdge(const std::string& name, Edge& item) {
  42.621 -      if (edgeReaders.find(name) != edgeReaders.end()) {
  42.622 +    void readEdge(std::string label, Edge& item) {
  42.623 +      if (edgeReaders.find(label) != edgeReaders.end()) {
  42.624  	ErrorMessage msg;
  42.625 -	msg << "Multiple read rule for edge: " << name;
  42.626 +	msg << "Multiple read rule for edge: " << label;
  42.627  	throw IoParameterError(msg.message());
  42.628        }
  42.629 -      edgeReaders.insert(make_pair(name, _reader_bits::ItemStore<Edge>(item)));
  42.630 +      edgeReaders.insert(make_pair(label, _reader_bits::ItemStore<Edge>(item)));
  42.631      }
  42.632  
  42.633    protected:
  42.634 @@ -1953,17 +1959,17 @@
  42.635      /// \brief Add an attribute reader command for the reader.
  42.636      ///
  42.637      /// Add an attribute reader command for the reader.
  42.638 -    template <typename Reader, typename Value>
  42.639 -    AttributeReader& readAttribute(const std::string& name, Value& value,
  42.640 -				   const Reader& reader = Reader()) {
  42.641 -      checkConcept<_reader_bits::ItemReader<Value>, Reader>();
  42.642 -      if (readers.find(name) != readers.end()) {
  42.643 +    template <typename ItemReader, typename Value>
  42.644 +    AttributeReader& readAttribute(std::string label, Value& value,
  42.645 +				   const ItemReader& ir = ItemReader()) {
  42.646 +      checkConcept<_reader_bits::ItemReader<Value>, ItemReader>();
  42.647 +      if (readers.find(label) != readers.end()) {
  42.648  	ErrorMessage msg;
  42.649 -	msg << "Multiple read rule for attribute: " << name;
  42.650 +	msg << "Multiple read rule for attribute: " << label;
  42.651  	throw IoParameterError(msg.message());
  42.652        }
  42.653 -      readers.insert(make_pair(name, new _reader_bits::
  42.654 -			       ValueReader<Value, Reader>(value, reader)));
  42.655 +      readers.insert(make_pair(label, new _reader_bits::
  42.656 +			       ValueReader<Value, ItemReader>(value, ir)));
  42.657        return *this;
  42.658      }
  42.659  
    43.1 --- a/lemon/lemon_writer.h	Fri Mar 02 17:56:22 2007 +0000
    43.2 +++ b/lemon/lemon_writer.h	Fri Mar 02 18:04:28 2007 +0000
    43.3 @@ -472,22 +472,22 @@
    43.4      ///
    43.5      /// Add a new node map writer command for the writer.
    43.6      template <typename Map>
    43.7 -    NodeSetWriter& writeNodeMap(std::string name, const Map& map) {
    43.8 +    NodeSetWriter& writeNodeMap(std::string label, const Map& map) {
    43.9        return writeNodeMap<typename Traits::
   43.10 -	template Writer<typename Map::Value>, Map>(name, map);
   43.11 +	template Writer<typename Map::Value>, Map>(label, map);
   43.12      }
   43.13  
   43.14      /// \brief Add a new node map writer command for the writer.
   43.15      ///
   43.16      /// Add a new node map writer command for the writer.
   43.17 -    template <typename Writer, typename Map>
   43.18 -    NodeSetWriter& writeNodeMap(std::string name, const Map& map, 
   43.19 -			    const Writer& writer = Writer()) {
   43.20 +    template <typename ItemWriter, typename Map>
   43.21 +    NodeSetWriter& writeNodeMap(std::string label, const Map& map, 
   43.22 +			    const ItemWriter& iw = ItemWriter()) {
   43.23        checkConcept<concepts::ReadMap<Node, typename Map::Value>, Map>();
   43.24 -      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
   43.25 +      checkConcept<_writer_bits::ItemWriter<typename Map::Value>,ItemWriter>();
   43.26        writers.push_back(
   43.27 -	make_pair(name, new _writer_bits::
   43.28 -		  MapWriter<Node, Map, Writer>(map, writer)));
   43.29 +	make_pair(label, new _writer_bits::
   43.30 +		  MapWriter<Node, Map, ItemWriter>(map, iw)));
   43.31        return *this;
   43.32      }
   43.33  
   43.34 @@ -504,7 +504,7 @@
   43.35      ///
   43.36      /// Write the content of the section.
   43.37      virtual void write(std::ostream& os) {
   43.38 -      for (int i = 0; i < (int)writers.size(); ++i) {
   43.39 +      for (int i = 0; i < int(writers.size()); ++i) {
   43.40  	if (writers[i].first == "label") {
   43.41  	  labelMap = writers[i].second;
   43.42  	  forceLabelMap = false;
   43.43 @@ -528,7 +528,7 @@
   43.44        if (forceLabelMap) {
   43.45  	os << "label\t";
   43.46        }
   43.47 -      for (int i = 0; i < (int)writers.size(); ++i) {
   43.48 +      for (int i = 0; i < int(writers.size()); ++i) {
   43.49  	os << writers[i].first << '\t';
   43.50        }
   43.51        os << std::endl;
   43.52 @@ -537,7 +537,7 @@
   43.53  	if (forceLabelMap) {
   43.54  	  os << graph.id(*it) << '\t';
   43.55  	}
   43.56 -	for (int i = 0; i < (int)writers.size(); ++i) {
   43.57 +	for (int i = 0; i < int(writers.size()); ++i) {
   43.58  	  writers[i].second->write(os, *it);
   43.59  	  os << '\t';
   43.60  	}
   43.61 @@ -661,22 +661,22 @@
   43.62      ///
   43.63      /// Add a new edge map writer command for the writer.
   43.64      template <typename Map>
   43.65 -    EdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
   43.66 +    EdgeSetWriter& writeEdgeMap(std::string label, const Map& map) {
   43.67        return writeEdgeMap<typename Traits::
   43.68 -	template Writer<typename Map::Value>, Map>(name, map);
   43.69 +	template Writer<typename Map::Value>, Map>(label, map);
   43.70      }
   43.71  
   43.72      /// \brief Add a new edge map writer command for the writer.
   43.73      ///
   43.74      /// Add a new edge map writer command for the writer.
   43.75 -    template <typename Writer, typename Map>
   43.76 -    EdgeSetWriter& writeEdgeMap(std::string name, const Map& map, 
   43.77 -			    const Writer& writer = Writer()) {
   43.78 +    template <typename ItemWriter, typename Map>
   43.79 +    EdgeSetWriter& writeEdgeMap(std::string label, const Map& map, 
   43.80 +			    const ItemWriter& iw = ItemWriter()) {
   43.81        checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
   43.82 -      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
   43.83 +      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, ItemWriter>();
   43.84        writers.push_back(
   43.85 -	make_pair(name, new _writer_bits::
   43.86 -		  MapWriter<Edge, Map, Writer>(map, writer)));
   43.87 +	make_pair(label, new _writer_bits::
   43.88 +		  MapWriter<Edge, Map, ItemWriter>(map, iw)));
   43.89        return *this;
   43.90      }
   43.91  
   43.92 @@ -696,7 +696,7 @@
   43.93        if (!nodeLabelWriter->isLabelWriter()) {
   43.94  	throw DataFormatError("Cannot find nodeset or label map");
   43.95        }
   43.96 -      for (int i = 0; i < (int)writers.size(); ++i) {
   43.97 +      for (int i = 0; i < int(writers.size()); ++i) {
   43.98  	if (writers[i].first == "label") {
   43.99  	  labelMap = writers[i].second;
  43.100  	  forceLabelMap = false;
  43.101 @@ -721,7 +721,7 @@
  43.102        if (forceLabelMap) {
  43.103  	os << "label\t";
  43.104        }
  43.105 -      for (int i = 0; i < (int)writers.size(); ++i) {
  43.106 +      for (int i = 0; i < int(writers.size()); ++i) {
  43.107  	os << writers[i].first << '\t';
  43.108        }
  43.109        os << std::endl;
  43.110 @@ -734,7 +734,7 @@
  43.111  	if (forceLabelMap) {
  43.112  	  os << graph.id(*it) << '\t';
  43.113  	}
  43.114 -	for (int i = 0; i < (int)writers.size(); ++i) {
  43.115 +	for (int i = 0; i < int(writers.size()); ++i) {
  43.116  	  writers[i].second->write(os, *it);
  43.117  	  os << '\t';
  43.118  	}
  43.119 @@ -867,22 +867,22 @@
  43.120      ///
  43.121      /// Add a new undirected map writer command for the writer.
  43.122      template <typename Map>
  43.123 -    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map) {
  43.124 +    UEdgeSetWriter& writeUEdgeMap(std::string label, const Map& map) {
  43.125        return writeUEdgeMap<typename Traits::
  43.126 -	template Writer<typename Map::Value>, Map>(name, map);
  43.127 +	template Writer<typename Map::Value>, Map>(label, map);
  43.128      }
  43.129  
  43.130      /// \brief Add a new undirected map writer command for the writer.
  43.131      ///
  43.132      /// Add a new undirected map writer command for the writer.
  43.133 -    template <typename Writer, typename Map>
  43.134 -    UEdgeSetWriter& writeUEdgeMap(std::string name, const Map& map, 
  43.135 -                                  const Writer& writer = Writer()) {
  43.136 +    template <typename ItemWriter, typename Map>
  43.137 +    UEdgeSetWriter& writeUEdgeMap(std::string label, const Map& map, 
  43.138 +                                  const ItemWriter& iw = ItemWriter()) {
  43.139        checkConcept<concepts::ReadMap<UEdge, typename Map::Value>, Map>();
  43.140 -      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
  43.141 +      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, ItemWriter>();
  43.142        writers.push_back(
  43.143 -	make_pair(name, new _writer_bits::
  43.144 -		  MapWriter<UEdge, Map, Writer>(map, writer)));
  43.145 +	make_pair(label, new _writer_bits::
  43.146 +		  MapWriter<UEdge, Map, ItemWriter>(map, iw)));
  43.147        return *this;
  43.148      }
  43.149  
  43.150 @@ -890,23 +890,23 @@
  43.151      ///
  43.152      /// Add a new directed map writer command for the writer.
  43.153      template <typename Map>
  43.154 -    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map) {
  43.155 +    UEdgeSetWriter& writeEdgeMap(std::string label, const Map& map) {
  43.156        return writeEdgeMap<typename Traits::
  43.157 -	template Writer<typename Map::Value>, Map>(name, map);
  43.158 +	template Writer<typename Map::Value>, Map>(label, map);
  43.159      }
  43.160  
  43.161      /// \brief Add a new directed map writer command for the writer.
  43.162      ///
  43.163      /// Add a new directed map writer command for the writer.
  43.164 -    template <typename Writer, typename Map>
  43.165 -    UEdgeSetWriter& writeEdgeMap(std::string name, const Map& map, 
  43.166 -                                 const Writer& writer = Writer()) {
  43.167 +    template <typename ItemWriter, typename Map>
  43.168 +    UEdgeSetWriter& writeEdgeMap(std::string label, const Map& map, 
  43.169 +                                 const ItemWriter& iw = ItemWriter()) {
  43.170        checkConcept<concepts::ReadMap<Edge, typename Map::Value>, Map>();
  43.171 -      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, Writer>();
  43.172 +      checkConcept<_writer_bits::ItemWriter<typename Map::Value>, ItemWriter>();
  43.173        writeUEdgeMap("+" + name, 
  43.174 -                    _writer_bits::forwardComposeMap(graph, map), writer);
  43.175 +                    _writer_bits::forwardComposeMap(graph, map), iw);
  43.176        writeUEdgeMap("-" + name, 
  43.177 -                    _writer_bits::backwardComposeMap(graph, map), writer);
  43.178 +                    _writer_bits::backwardComposeMap(graph, map), iw);
  43.179        return *this;
  43.180      }
  43.181  
  43.182 @@ -926,7 +926,7 @@
  43.183        if (!nodeLabelWriter->isLabelWriter()) {
  43.184  	throw DataFormatError("Cannot find nodeset or label map");
  43.185        }
  43.186 -      for (int i = 0; i < (int)writers.size(); ++i) {
  43.187 +      for (int i = 0; i < int(writers.size()); ++i) {
  43.188  	if (writers[i].first == "label") {
  43.189  	  labelMap = writers[i].second;
  43.190  	  forceLabelMap = false;
  43.191 @@ -951,7 +951,7 @@
  43.192        if (forceLabelMap) {
  43.193  	os << "label\t";
  43.194        }
  43.195 -      for (int i = 0; i < (int)writers.size(); ++i) {
  43.196 +      for (int i = 0; i < int(writers.size()); ++i) {
  43.197  	os << writers[i].first << '\t';
  43.198        }
  43.199        os << std::endl;
  43.200 @@ -964,7 +964,7 @@
  43.201  	if (forceLabelMap) {
  43.202  	  os << graph.id(*it) << '\t';
  43.203  	}
  43.204 -	for (int i = 0; i < (int)writers.size(); ++i) {
  43.205 +	for (int i = 0; i < int(writers.size()); ++i) {
  43.206  	  writers[i].second->write(os, *it);
  43.207  	  os << '\t';
  43.208  	}
  43.209 @@ -1080,8 +1080,8 @@
  43.210      /// \brief Add a node writer command for the NodeWriter.
  43.211      ///
  43.212      /// Add a node writer command for the NodeWriter.
  43.213 -    void writeNode(const std::string& name, const Node& item) {
  43.214 -      writers.push_back(make_pair(name, &item));
  43.215 +    void writeNode(std::string label, const Node& item) {
  43.216 +      writers.push_back(make_pair(label, &item));
  43.217      }
  43.218  
  43.219    protected:
  43.220 @@ -1100,7 +1100,7 @@
  43.221        if (!labelWriter->isLabelWriter()) {
  43.222  	throw DataFormatError("Cannot find nodeset or label map");
  43.223        }
  43.224 -      for (int i = 0; i < (int)writers.size(); ++i) {
  43.225 +      for (int i = 0; i < int(writers.size()); ++i) {
  43.226  	os << writers[i].first << ' ';
  43.227  	labelWriter->write(os, *(writers[i].second));
  43.228  	os << std::endl;
  43.229 @@ -1164,8 +1164,8 @@
  43.230      /// \brief Add an edge writer command for the EdgeWriter.
  43.231      ///
  43.232      /// Add an edge writer command for the EdgeWriter.
  43.233 -    void writeEdge(const std::string& name, const Edge& item) {
  43.234 -      writers.push_back(make_pair(name, &item));
  43.235 +    void writeEdge(std::string label, const Edge& item) {
  43.236 +      writers.push_back(make_pair(label, &item));
  43.237      }
  43.238  
  43.239    protected:
  43.240 @@ -1184,7 +1184,7 @@
  43.241        if (!labelWriter->isLabelWriter()) {
  43.242  	throw DataFormatError("Cannot find edgeset or label map");
  43.243        }
  43.244 -      for (int i = 0; i < (int)writers.size(); ++i) {
  43.245 +      for (int i = 0; i < int(writers.size()); ++i) {
  43.246  	os << writers[i].first << ' ';
  43.247  	labelWriter->write(os, *(writers[i].second));
  43.248  	os << std::endl;
  43.249 @@ -1256,15 +1256,15 @@
  43.250      /// \brief Add an edge writer command for the UEdgeWriter.
  43.251      ///
  43.252      /// Add an edge writer command for the UEdgeWriter.
  43.253 -    void writeEdge(const std::string& name, const Edge& item) {
  43.254 -      edgeWriters.push_back(make_pair(name, &item));
  43.255 +    void writeEdge(std::string label, const Edge& item) {
  43.256 +      edgeWriters.push_back(make_pair(label, &item));
  43.257      }
  43.258  
  43.259      /// \brief Add an undirected edge writer command for the UEdgeWriter.
  43.260      ///
  43.261      /// Add an undirected edge writer command for the UEdgeWriter.
  43.262 -    void writeUEdge(const std::string& name, const UEdge& item) {
  43.263 -      uEdgeWriters.push_back(make_pair(name, &item));
  43.264 +    void writeUEdge(std::string label, const UEdge& item) {
  43.265 +      uEdgeWriters.push_back(make_pair(label, &item));
  43.266      }
  43.267  
  43.268    protected:
  43.269 @@ -1286,12 +1286,12 @@
  43.270        if (!uEdgeLabelWriter->isLabelWriter()) {
  43.271  	throw DataFormatError("Cannot find undirected edgeset or label map");
  43.272        }
  43.273 -      for (int i = 0; i < (int)uEdgeWriters.size(); ++i) {
  43.274 +      for (int i = 0; i < int(uEdgeWriters.size()); ++i) {
  43.275  	os << uEdgeWriters[i].first << ' ';
  43.276  	uEdgeLabelWriter->write(os, *(uEdgeWriters[i].second));
  43.277  	os << std::endl;
  43.278        }
  43.279 -      for (int i = 0; i < (int)edgeWriters.size(); ++i) {
  43.280 +      for (int i = 0; i < int(edgeWriters.size()); ++i) {
  43.281  	os << edgeWriters[i].first << ' ';
  43.282  	edgeLabelWriter->write(os, *(edgeWriters[i].second));
  43.283  	os << std::endl;
  43.284 @@ -1363,7 +1363,7 @@
  43.285      ///
  43.286      /// Add an attribute writer command for the writer.
  43.287      template <typename Value>
  43.288 -    AttributeWriter& writeAttribute(const std::string& name, 
  43.289 +    AttributeWriter& writeAttribute(std::string label, 
  43.290  				    const Value& value) {
  43.291        return 
  43.292  	writeAttribute<typename Traits::template Writer<Value> >(name, value);
  43.293 @@ -1372,13 +1372,12 @@
  43.294      /// \brief Add an attribute writer command for the writer.
  43.295      ///
  43.296      /// Add an attribute writer command for the writer.
  43.297 -    template <typename Writer, typename Value>
  43.298 -    AttributeWriter& writeAttribute(const std::string& name, 
  43.299 -				    const Value& value,
  43.300 -				    const Writer& writer = Writer()) {
  43.301 -      checkConcept<_writer_bits::ItemWriter<Value>, Writer>();
  43.302 -      writers.push_back(make_pair(name, new _writer_bits::
  43.303 -				  ValueWriter<Value, Writer>(value, writer)));
  43.304 +    template <typename ItemWriter, typename Value>
  43.305 +    AttributeWriter& writeAttribute(std::string label, const Value& value,
  43.306 +				    const ItemWriter& iw = ItemWriter()) {
  43.307 +      checkConcept<_writer_bits::ItemWriter<Value>, ItemWriter>();
  43.308 +      writers.push_back(make_pair(label, new _writer_bits::
  43.309 +				  ValueWriter<Value, ItemWriter>(value, iw)));
  43.310        return *this;
  43.311      }
  43.312  
    44.1 --- a/lemon/list_graph.h	Fri Mar 02 17:56:22 2007 +0000
    44.2 +++ b/lemon/list_graph.h	Fri Mar 02 18:04:28 2007 +0000
    44.3 @@ -522,16 +522,15 @@
    44.4            snapshot.eraseNode(node);
    44.5          }
    44.6          virtual void erase(const std::vector<Node>& nodes) {
    44.7 -          for (int i = 0; i < (int)nodes.size(); ++i) {
    44.8 +          for (int i = 0; i < int(nodes.size()); ++i) {
    44.9              snapshot.eraseNode(nodes[i]);
   44.10            }
   44.11          }
   44.12          virtual void build() {
   44.13 -          NodeNotifier* _notifier = notifier();
   44.14            Node node;
   44.15            std::vector<Node> nodes;
   44.16 -          for (_notifier->first(node); node != INVALID; 
   44.17 -               _notifier->next(node)) {
   44.18 +          for (notifier()->first(node); node != INVALID; 
   44.19 +               notifier()->next(node)) {
   44.20              nodes.push_back(node);
   44.21            }
   44.22            for (int i = nodes.size() - 1; i >= 0; --i) {
   44.23 @@ -539,10 +538,9 @@
   44.24            }
   44.25          }
   44.26          virtual void clear() {
   44.27 -          NodeNotifier* _notifier = notifier();
   44.28            Node node;
   44.29 -          for (_notifier->first(node); node != INVALID; 
   44.30 -               _notifier->next(node)) {
   44.31 +          for (notifier()->first(node); node != INVALID; 
   44.32 +               notifier()->next(node)) {
   44.33              snapshot.eraseNode(node);
   44.34            }
   44.35          }
   44.36 @@ -574,16 +572,15 @@
   44.37            snapshot.eraseEdge(edge);
   44.38          }
   44.39          virtual void erase(const std::vector<Edge>& edges) {
   44.40 -          for (int i = 0; i < (int)edges.size(); ++i) {
   44.41 +          for (int i = 0; i < int(edges.size()); ++i) {
   44.42              snapshot.eraseEdge(edges[i]);
   44.43            }
   44.44          }
   44.45          virtual void build() {
   44.46 -          EdgeNotifier* _notifier = notifier();
   44.47            Edge edge;
   44.48            std::vector<Edge> edges;
   44.49 -          for (_notifier->first(edge); edge != INVALID; 
   44.50 -               _notifier->next(edge)) {
   44.51 +          for (notifier()->first(edge); edge != INVALID; 
   44.52 +               notifier()->next(edge)) {
   44.53              edges.push_back(edge);
   44.54            }
   44.55            for (int i = edges.size() - 1; i >= 0; --i) {
   44.56 @@ -591,9 +588,9 @@
   44.57            }
   44.58          }
   44.59          virtual void clear() {
   44.60 -          EdgeNotifier* _notifier = notifier();
   44.61            Edge edge;
   44.62 -          for (_notifier->first(edge); edge != INVALID; _notifier->next(edge)) {
   44.63 +          for (notifier()->first(edge); edge != INVALID; 
   44.64 +               notifier()->next(edge)) {
   44.65              snapshot.eraseEdge(edge);
   44.66            }
   44.67          }
   44.68 @@ -1269,16 +1266,15 @@
   44.69            snapshot.eraseNode(node);
   44.70          }
   44.71          virtual void erase(const std::vector<Node>& nodes) {
   44.72 -          for (int i = 0; i < (int)nodes.size(); ++i) {
   44.73 +          for (int i = 0; i < int(nodes.size()); ++i) {
   44.74              snapshot.eraseNode(nodes[i]);
   44.75            }
   44.76          }
   44.77          virtual void build() {
   44.78 -          NodeNotifier* _notifier = notifier();
   44.79            Node node;
   44.80            std::vector<Node> nodes;
   44.81 -          for (_notifier->first(node); node != INVALID; 
   44.82 -               _notifier->next(node)) {
   44.83 +          for (notifier()->first(node); node != INVALID; 
   44.84 +               notifier()->next(node)) {
   44.85              nodes.push_back(node);
   44.86            }
   44.87            for (int i = nodes.size() - 1; i >= 0; --i) {
   44.88 @@ -1286,10 +1282,9 @@
   44.89            }
   44.90          }
   44.91          virtual void clear() {
   44.92 -          NodeNotifier* _notifier = notifier();
   44.93            Node node;
   44.94 -          for (_notifier->first(node); node != INVALID; 
   44.95 -               _notifier->next(node)) {
   44.96 +          for (notifier()->first(node); node != INVALID; 
   44.97 +               notifier()->next(node)) {
   44.98              snapshot.eraseNode(node);
   44.99            }
  44.100          }
  44.101 @@ -1321,16 +1316,15 @@
  44.102            snapshot.eraseUEdge(edge);
  44.103          }
  44.104          virtual void erase(const std::vector<UEdge>& edges) {
  44.105 -          for (int i = 0; i < (int)edges.size(); ++i) {
  44.106 +          for (int i = 0; i < int(edges.size()); ++i) {
  44.107              snapshot.eraseUEdge(edges[i]);
  44.108            }
  44.109          }
  44.110          virtual void build() {
  44.111 -          UEdgeNotifier* _notifier = notifier();
  44.112            UEdge edge;
  44.113            std::vector<UEdge> edges;
  44.114 -          for (_notifier->first(edge); edge != INVALID; 
  44.115 -               _notifier->next(edge)) {
  44.116 +          for (notifier()->first(edge); edge != INVALID; 
  44.117 +               notifier()->next(edge)) {
  44.118              edges.push_back(edge);
  44.119            }
  44.120            for (int i = edges.size() - 1; i >= 0; --i) {
  44.121 @@ -1338,10 +1332,9 @@
  44.122            }
  44.123          }
  44.124          virtual void clear() {
  44.125 -          UEdgeNotifier* _notifier = notifier();
  44.126            UEdge edge;
  44.127 -          for (_notifier->first(edge); edge != INVALID; 
  44.128 -               _notifier->next(edge)) {
  44.129 +          for (notifier()->first(edge); edge != INVALID; 
  44.130 +               notifier()->next(edge)) {
  44.131              snapshot.eraseUEdge(edge);
  44.132            }
  44.133          }
  44.134 @@ -1575,29 +1568,29 @@
  44.135      }
  44.136    
  44.137      void first(UEdge& edge) const {
  44.138 -      int aNodeId = first_anode;
  44.139 -      while (aNodeId != -1 && aNodes[aNodeId].first_edge == -1) {
  44.140 -        aNodeId = aNodes[aNodeId].next != -1 ? 
  44.141 -          aNodes[aNodeId].next >> 1 : -1;
  44.142 +      int aid = first_anode;
  44.143 +      while (aid != -1 && aNodes[aid].first_edge == -1) {
  44.144 +        aid = aNodes[aid].next != -1 ? 
  44.145 +          aNodes[aid].next >> 1 : -1;
  44.146        }
  44.147 -      if (aNodeId != -1) {
  44.148 -        edge.id = aNodes[aNodeId].first_edge;
  44.149 +      if (aid != -1) {
  44.150 +        edge.id = aNodes[aid].first_edge;
  44.151        } else {
  44.152          edge.id = -1;
  44.153        }
  44.154      }
  44.155      void next(UEdge& edge) const {
  44.156 -      int aNodeId = edges[edge.id].aNode >> 1;
  44.157 +      int aid = edges[edge.id].aNode >> 1;
  44.158        edge.id = edges[edge.id].next_out;
  44.159        if (edge.id == -1) {
  44.160 -        aNodeId = aNodes[aNodeId].next != -1 ? 
  44.161 -          aNodes[aNodeId].next >> 1 : -1;
  44.162 -        while (aNodeId != -1 && aNodes[aNodeId].first_edge == -1) {
  44.163 -          aNodeId = aNodes[aNodeId].next != -1 ? 
  44.164 -          aNodes[aNodeId].next >> 1 : -1;
  44.165 +        aid = aNodes[aid].next != -1 ? 
  44.166 +          aNodes[aid].next >> 1 : -1;
  44.167 +        while (aid != -1 && aNodes[aid].first_edge == -1) {
  44.168 +          aid = aNodes[aid].next != -1 ? 
  44.169 +          aNodes[aid].next >> 1 : -1;
  44.170          }
  44.171 -        if (aNodeId != -1) {
  44.172 -          edge.id = aNodes[aNodeId].first_edge;
  44.173 +        if (aid != -1) {
  44.174 +          edge.id = aNodes[aid].first_edge;
  44.175          } else {
  44.176            edge.id = -1;
  44.177          }
  44.178 @@ -1677,45 +1670,45 @@
  44.179      }
  44.180  
  44.181      Node addANode() {
  44.182 -      int aNodeId;
  44.183 +      int aid;
  44.184        if (first_free_anode == -1) {
  44.185 -        aNodeId = aNodes.size();
  44.186 +        aid = aNodes.size();
  44.187          aNodes.push_back(NodeT());
  44.188        } else {
  44.189 -        aNodeId = first_free_anode;
  44.190 +        aid = first_free_anode;
  44.191          first_free_anode = aNodes[first_free_anode].next;
  44.192        }
  44.193        if (first_anode != -1) {
  44.194 -        aNodes[aNodeId].next = first_anode << 1;
  44.195 -        aNodes[first_anode].prev = aNodeId << 1;
  44.196 +        aNodes[aid].next = first_anode << 1;
  44.197 +        aNodes[first_anode].prev = aid << 1;
  44.198        } else {
  44.199 -        aNodes[aNodeId].next = -1;
  44.200 +        aNodes[aid].next = -1;
  44.201        }
  44.202 -      aNodes[aNodeId].prev = -1;
  44.203 -      first_anode = aNodeId;
  44.204 -      aNodes[aNodeId].first_edge = -1;
  44.205 -      return Node(aNodeId << 1);
  44.206 +      aNodes[aid].prev = -1;
  44.207 +      first_anode = aid;
  44.208 +      aNodes[aid].first_edge = -1;
  44.209 +      return Node(aid << 1);
  44.210      }
  44.211  
  44.212      Node addBNode() {
  44.213 -      int bNodeId;
  44.214 +      int bid;
  44.215        if (first_free_bnode == -1) {
  44.216 -        bNodeId = bNodes.size();
  44.217 +        bid = bNodes.size();
  44.218          bNodes.push_back(NodeT());
  44.219        } else {
  44.220 -        bNodeId = first_free_bnode;
  44.221 +        bid = first_free_bnode;
  44.222          first_free_bnode = bNodes[first_free_bnode].next;
  44.223        }
  44.224        if (first_bnode != -1) {
  44.225 -        bNodes[bNodeId].next = (first_bnode << 1) + 1;
  44.226 -        bNodes[first_bnode].prev = (bNodeId << 1) + 1;
  44.227 +        bNodes[bid].next = (first_bnode << 1) + 1;
  44.228 +        bNodes[first_bnode].prev = (bid << 1) + 1;
  44.229        } else {
  44.230 -        bNodes[bNodeId].next = -1;
  44.231 +        bNodes[bid].next = -1;
  44.232        }
  44.233 -      bNodes[bNodeId].prev = -1;
  44.234 -      first_bnode = bNodeId;
  44.235 -      bNodes[bNodeId].first_edge = -1;
  44.236 -      return Node((bNodeId << 1) + 1);
  44.237 +      bNodes[bid].prev = -1;
  44.238 +      first_bnode = bid;
  44.239 +      bNodes[bid].first_edge = -1;
  44.240 +      return Node((bid << 1) + 1);
  44.241      }
  44.242  
  44.243      UEdge addEdge(const Node& source, const Node& target) {
  44.244 @@ -1752,31 +1745,31 @@
  44.245  
  44.246      void erase(const Node& node) {
  44.247        if (aNode(node)) {
  44.248 -        int aNodeId = node.id >> 1;
  44.249 -        if (aNodes[aNodeId].prev != -1) {
  44.250 -          aNodes[aNodes[aNodeId].prev >> 1].next = aNodes[aNodeId].next;
  44.251 +        int aid = node.id >> 1;
  44.252 +        if (aNodes[aid].prev != -1) {
  44.253 +          aNodes[aNodes[aid].prev >> 1].next = aNodes[aid].next;
  44.254          } else {
  44.255            first_anode = 
  44.256 -            aNodes[aNodeId].next != -1 ? aNodes[aNodeId].next >> 1 : -1;
  44.257 +            aNodes[aid].next != -1 ? aNodes[aid].next >> 1 : -1;
  44.258          }
  44.259 -        if (aNodes[aNodeId].next != -1) {
  44.260 -          aNodes[aNodes[aNodeId].next >> 1].prev = aNodes[aNodeId].prev;
  44.261 +        if (aNodes[aid].next != -1) {
  44.262 +          aNodes[aNodes[aid].next >> 1].prev = aNodes[aid].prev;
  44.263          }
  44.264 -        aNodes[aNodeId].next = first_free_anode;
  44.265 -        first_free_anode = aNodeId;
  44.266 +        aNodes[aid].next = first_free_anode;
  44.267 +        first_free_anode = aid;
  44.268        } else {
  44.269 -        int bNodeId = node.id >> 1;
  44.270 -        if (bNodes[bNodeId].prev != -1) {
  44.271 -          bNodes[bNodes[bNodeId].prev >> 1].next = bNodes[bNodeId].next;
  44.272 +        int bid = node.id >> 1;
  44.273 +        if (bNodes[bid].prev != -1) {
  44.274 +          bNodes[bNodes[bid].prev >> 1].next = bNodes[bid].next;
  44.275          } else {
  44.276            first_bnode = 
  44.277 -            bNodes[bNodeId].next != -1 ? bNodes[bNodeId].next >> 1 : -1;
  44.278 +            bNodes[bid].next != -1 ? bNodes[bid].next >> 1 : -1;
  44.279          }
  44.280 -        if (bNodes[bNodeId].next != -1) {
  44.281 -          bNodes[bNodes[bNodeId].next >> 1].prev = bNodes[bNodeId].prev;
  44.282 +        if (bNodes[bid].next != -1) {
  44.283 +          bNodes[bNodes[bid].next >> 1].prev = bNodes[bid].prev;
  44.284          }
  44.285 -        bNodes[bNodeId].next = first_free_bnode;
  44.286 -        first_free_bnode = bNodeId;
  44.287 +        bNodes[bid].next = first_free_bnode;
  44.288 +        first_free_bnode = bid;
  44.289        }
  44.290      }
  44.291  
  44.292 @@ -2051,16 +2044,15 @@
  44.293            snapshot.eraseNode(node);
  44.294          }
  44.295          virtual void erase(const std::vector<Node>& nodes) {
  44.296 -          for (int i = 0; i < (int)nodes.size(); ++i) {
  44.297 +          for (int i = 0; i < int(nodes.size()); ++i) {
  44.298              snapshot.eraseNode(nodes[i]);
  44.299            }
  44.300          }
  44.301          virtual void build() {
  44.302 -          NodeNotifier* _notifier = notifier();
  44.303            Node node;
  44.304            std::vector<Node> nodes;
  44.305 -          for (_notifier->first(node); node != INVALID; 
  44.306 -               _notifier->next(node)) {
  44.307 +          for (notifier()->first(node); node != INVALID; 
  44.308 +               notifier()->next(node)) {
  44.309              nodes.push_back(node);
  44.310            }
  44.311            for (int i = nodes.size() - 1; i >= 0; --i) {
  44.312 @@ -2068,10 +2060,9 @@
  44.313            }
  44.314          }
  44.315          virtual void clear() {
  44.316 -          NodeNotifier* _notifier = notifier();
  44.317            Node node;
  44.318 -          for (_notifier->first(node); node != INVALID; 
  44.319 -               _notifier->next(node)) {
  44.320 +          for (notifier()->first(node); node != INVALID; 
  44.321 +               notifier()->next(node)) {
  44.322              snapshot.eraseNode(node);
  44.323            }
  44.324          }
  44.325 @@ -2103,16 +2094,15 @@
  44.326            snapshot.eraseUEdge(edge);
  44.327          }
  44.328          virtual void erase(const std::vector<UEdge>& edges) {
  44.329 -          for (int i = 0; i < (int)edges.size(); ++i) {
  44.330 +          for (int i = 0; i < int(edges.size()); ++i) {
  44.331              snapshot.eraseUEdge(edges[i]);
  44.332            }
  44.333          }
  44.334          virtual void build() {
  44.335 -          UEdgeNotifier* _notifier = notifier();
  44.336            UEdge edge;
  44.337            std::vector<UEdge> edges;
  44.338 -          for (_notifier->first(edge); edge != INVALID; 
  44.339 -               _notifier->next(edge)) {
  44.340 +          for (notifier()->first(edge); edge != INVALID; 
  44.341 +               notifier()->next(edge)) {
  44.342              edges.push_back(edge);
  44.343            }
  44.344            for (int i = edges.size() - 1; i >= 0; --i) {
  44.345 @@ -2120,10 +2110,9 @@
  44.346            }
  44.347          }
  44.348          virtual void clear() {
  44.349 -          UEdgeNotifier* _notifier = notifier();
  44.350            UEdge edge;
  44.351 -          for (_notifier->first(edge); edge != INVALID; 
  44.352 -               _notifier->next(edge)) {
  44.353 +          for (notifier()->first(edge); edge != INVALID; 
  44.354 +               notifier()->next(edge)) {
  44.355              snapshot.eraseUEdge(edge);
  44.356            }
  44.357          }
    45.1 --- a/lemon/lp_base.h	Fri Mar 02 17:56:22 2007 +0000
    45.2 +++ b/lemon/lp_base.h	Fri Mar 02 18:04:28 2007 +0000
    45.3 @@ -199,20 +199,20 @@
    45.4  
    45.5    protected:
    45.6  
    45.7 -    int _lpId(const Col& col) const {
    45.8 -      return cols.floatingId(id(col));
    45.9 +    int _lpId(const Col& c) const {
   45.10 +      return cols.floatingId(id(c));
   45.11      }
   45.12  
   45.13 -    int _lpId(const Row& row) const {
   45.14 -      return rows.floatingId(id(row));
   45.15 +    int _lpId(const Row& r) const {
   45.16 +      return rows.floatingId(id(r));
   45.17      }
   45.18  
   45.19 -    Col _item(int id, Col) const {
   45.20 -      return Col(cols.fixId(id));
   45.21 +    Col _item(int i, Col) const {
   45.22 +      return Col(cols.fixId(i));
   45.23      }
   45.24  
   45.25 -    Row _item(int id, Row) const {
   45.26 -      return Row(rows.fixId(id));
   45.27 +    Row _item(int i, Row) const {
   45.28 +      return Row(rows.fixId(i));
   45.29      }
   45.30  
   45.31  
   45.32 @@ -891,10 +891,10 @@
   45.33      ///\param obj is the corresponding component of the objective
   45.34      ///function. It is 0 by default.
   45.35      ///\return The created column.
   45.36 -    Col addCol(const DualExpr &e, Value obj=0) {
   45.37 +    Col addCol(const DualExpr &e, Value o = 0) {
   45.38        Col c=addCol();
   45.39        col(c,e);
   45.40 -      objCoeff(c,obj);
   45.41 +      objCoeff(c,o);
   45.42        return c;
   45.43      }
   45.44  
    46.1 --- a/lemon/lp_glpk.cc	Fri Mar 02 17:56:22 2007 +0000
    46.2 +++ b/lemon/lp_glpk.cc	Fri Mar 02 18:04:28 2007 +0000
    46.3 @@ -103,28 +103,28 @@
    46.4  
    46.5    
    46.6    void LpGlpk::_eraseCol(int i) {
    46.7 -    int cols[2];
    46.8 -    cols[1]=i;
    46.9 -    lpx_del_cols(lp, 1, cols);
   46.10 +    int ca[2];
   46.11 +    ca[1]=i;
   46.12 +    lpx_del_cols(lp, 1, ca);
   46.13    }
   46.14    
   46.15    void LpGlpk::_eraseRow(int i) {
   46.16 -    int rows[2];
   46.17 -    rows[1]=i;
   46.18 -    lpx_del_rows(lp, 1, rows);
   46.19 +    int ra[2];
   46.20 +    ra[1]=i;
   46.21 +    lpx_del_rows(lp, 1, ra);
   46.22    }
   46.23  
   46.24 -  void LpGlpk::_getColName(int col, std::string & name) const
   46.25 +  void LpGlpk::_getColName(int c, std::string & name) const
   46.26    {
   46.27      
   46.28 -    char *n = lpx_get_col_name(lp,col);
   46.29 +    char *n = lpx_get_col_name(lp,c);
   46.30      name = n?n:"";
   46.31    }
   46.32    
   46.33    
   46.34 -  void LpGlpk::_setColName(int col, const std::string & name)
   46.35 +  void LpGlpk::_setColName(int c, const std::string & name)
   46.36    {
   46.37 -    lpx_set_col_name(lp,col,const_cast<char*>(name.c_str()));
   46.38 +    lpx_set_col_name(lp,c,const_cast<char*>(name.c_str()));
   46.39  
   46.40    }
   46.41  
   46.42 @@ -151,14 +151,14 @@
   46.43      lpx_set_mat_row(lp, i, values.size() - 1, &indices[0], &values[0]);
   46.44    }
   46.45  
   46.46 -  void LpGlpk::_getRowCoeffs(int i, RowIterator b) const
   46.47 +  void LpGlpk::_getRowCoeffs(int ix, RowIterator b) const
   46.48    {
   46.49 -    int length = lpx_get_mat_row(lp, i, 0, 0);
   46.50 +    int length = lpx_get_mat_row(lp, ix, 0, 0);
   46.51      
   46.52      std::vector<int> indices(length + 1);
   46.53      std::vector<Value> values(length + 1);
   46.54      
   46.55 -    lpx_get_mat_row(lp, i, &indices[0], &values[0]);
   46.56 +    lpx_get_mat_row(lp, ix, &indices[0], &values[0]);
   46.57      
   46.58      for (int i = 1; i <= length; ++i) {
   46.59        *b = std::make_pair(indices[i], values[i]);
   46.60 @@ -166,7 +166,7 @@
   46.61      }
   46.62    }
   46.63    
   46.64 -  void LpGlpk::_setColCoeffs(int i, ConstColIterator b, ConstColIterator e) {
   46.65 +  void LpGlpk::_setColCoeffs(int ix, ConstColIterator b, ConstColIterator e) {
   46.66  
   46.67      std::vector<int> indices;
   46.68      std::vector<Value> values;
   46.69 @@ -179,17 +179,17 @@
   46.70        values.push_back(it->second);
   46.71      }
   46.72      
   46.73 -    lpx_set_mat_col(lp, i, values.size() - 1, &indices[0], &values[0]);
   46.74 +    lpx_set_mat_col(lp, ix, values.size() - 1, &indices[0], &values[0]);
   46.75    }
   46.76  
   46.77 -  void LpGlpk::_getColCoeffs(int i, ColIterator b) const
   46.78 +  void LpGlpk::_getColCoeffs(int ix, ColIterator b) const
   46.79    {
   46.80 -    int length = lpx_get_mat_col(lp, i, 0, 0);
   46.81 +    int length = lpx_get_mat_col(lp, ix, 0, 0);
   46.82      
   46.83      std::vector<int> indices(length + 1);
   46.84      std::vector<Value> values(length + 1);
   46.85      
   46.86 -    lpx_get_mat_col(lp, i, &indices[0], &values[0]);
   46.87 +    lpx_get_mat_col(lp, ix, &indices[0], &values[0]);
   46.88      
   46.89      for (int i = 1; i <= length; ++i) {
   46.90        *b = std::make_pair(indices[i], values[i]);
   46.91 @@ -197,23 +197,23 @@
   46.92      }
   46.93    }
   46.94  
   46.95 -  void LpGlpk::_setCoeff(int row, int col, Value value) 
   46.96 +  void LpGlpk::_setCoeff(int ix, int jx, Value value) 
   46.97    {
   46.98  
   46.99      if (lpx_get_num_cols(lp) < lpx_get_num_rows(lp)) {
  46.100  
  46.101 -      int length=lpx_get_mat_row(lp, row, 0, 0);
  46.102 +      int length=lpx_get_mat_row(lp, ix, 0, 0);
  46.103        
  46.104        std::vector<int> indices(length + 2);
  46.105        std::vector<Value> values(length + 2);
  46.106        
  46.107 -      lpx_get_mat_row(lp, row, &indices[0], &values[0]);
  46.108 +      lpx_get_mat_row(lp, ix, &indices[0], &values[0]);
  46.109        
  46.110        //The following code does not suppose that the elements of the
  46.111        //array indices are sorted
  46.112        bool found=false;
  46.113        for (int i = 1; i <= length; ++i) {
  46.114 -        if (indices[i]==col){
  46.115 +        if (indices[i]==jx){
  46.116            found=true;
  46.117            values[i]=value;
  46.118            break;
  46.119 @@ -221,26 +221,26 @@
  46.120        }
  46.121        if (!found){
  46.122          ++length;
  46.123 -        indices[length]=col;
  46.124 +        indices[length]=jx;
  46.125          values[length]=value;
  46.126        }
  46.127      
  46.128 -      lpx_set_mat_row(lp, row, length, &indices[0], &values[0]);
  46.129 +      lpx_set_mat_row(lp, ix, length, &indices[0], &values[0]);
  46.130  
  46.131      } else {
  46.132  
  46.133 -      int length=lpx_get_mat_col(lp, col, 0, 0);
  46.134 +      int length=lpx_get_mat_col(lp, jx, 0, 0);
  46.135        
  46.136        std::vector<int> indices(length + 2);
  46.137        std::vector<Value> values(length + 2);
  46.138        
  46.139 -      lpx_get_mat_col(lp, col, &indices[0], &values[0]);
  46.140 +      lpx_get_mat_col(lp, jx, &indices[0], &values[0]);
  46.141        
  46.142        //The following code does not suppose that the elements of the
  46.143        //array indices are sorted
  46.144        bool found=false;
  46.145        for (int i = 1; i <= length; ++i) {
  46.146 -        if (indices[i]==col){
  46.147 +        if (indices[i]==jx){
  46.148            found=true;
  46.149            values[i]=value;
  46.150            break;
  46.151 @@ -248,28 +248,28 @@
  46.152        }
  46.153        if (!found){
  46.154          ++length;
  46.155 -        indices[length]=row;
  46.156 +        indices[length]=ix;
  46.157          values[length]=value;
  46.158        }
  46.159      
  46.160 -      lpx_set_mat_col(lp, col, length, &indices[0], &values[0]);
  46.161 +      lpx_set_mat_col(lp, jx, length, &indices[0], &values[0]);
  46.162      }
  46.163    }
  46.164  
  46.165 -  LpGlpk::Value LpGlpk::_getCoeff(int row, int col) const
  46.166 +  LpGlpk::Value LpGlpk::_getCoeff(int ix, int jx) const
  46.167    {
  46.168  
  46.169 -    int length=lpx_get_mat_row(lp, row, 0, 0);
  46.170 +    int length=lpx_get_mat_row(lp, ix, 0, 0);
  46.171      
  46.172      std::vector<int> indices(length + 1);
  46.173      std::vector<Value> values(length + 1);
  46.174      
  46.175 -    lpx_get_mat_row(lp, row, &indices[0], &values[0]);
  46.176 +    lpx_get_mat_row(lp, ix, &indices[0], &values[0]);
  46.177      
  46.178      //The following code does not suppose that the elements of the
  46.179      //array indices are sorted
  46.180      for (int i = 1; i <= length; ++i) {
  46.181 -      if (indices[i]==col){
  46.182 +      if (indices[i]==jx){
  46.183  	return values[i];
  46.184        }
  46.185      }
    47.1 --- a/lemon/lp_soplex.cc	Fri Mar 02 17:56:22 2007 +0000
    47.2 +++ b/lemon/lp_soplex.cc	Fri Mar 02 18:04:28 2007 +0000
    47.3 @@ -44,15 +44,15 @@
    47.4  
    47.5    LpSolverBase &LpSoplex::_copyLp() {
    47.6      LpSoplex* newlp = new LpSoplex();
    47.7 -    ((soplex::SPxLP&)*(newlp->soplex)) = *soplex;
    47.8 +    (*static_cast<soplex::SPxLP*>(newlp->soplex)) = *soplex;
    47.9      return *newlp;
   47.10    }
   47.11  
   47.12    int LpSoplex::_addCol() {
   47.13 -    soplex::LPCol col;
   47.14 -    col.setLower(-soplex::infinity);
   47.15 -    col.setUpper(soplex::infinity);
   47.16 -    soplex->addCol(col);
   47.17 +    soplex::LPCol c;
   47.18 +    c.setLower(-soplex::infinity);
   47.19 +    c.setUpper(soplex::infinity);
   47.20 +    soplex->addCol(c);
   47.21  
   47.22      colNames.push_back(std::string());
   47.23      primal_value.push_back(0.0);
   47.24 @@ -62,10 +62,10 @@
   47.25    }
   47.26  
   47.27    int LpSoplex::_addRow() {
   47.28 -    soplex::LPRow row;
   47.29 -    row.setLhs(-soplex::infinity);
   47.30 -    row.setRhs(soplex::infinity);
   47.31 -    soplex->addRow(row);
   47.32 +    soplex::LPRow r;
   47.33 +    r.setLhs(-soplex::infinity);
   47.34 +    r.setRhs(soplex::infinity);
   47.35 +    soplex->addRow(r);
   47.36  
   47.37      dual_value.push_back(0.0);
   47.38      solved = false;
   47.39 @@ -92,15 +92,15 @@
   47.40      solved = false;
   47.41    }
   47.42    
   47.43 -  void LpSoplex::_getColName(int col, std::string &name) const {
   47.44 -    name = colNames[col]; 
   47.45 +  void LpSoplex::_getColName(int c, std::string &name) const {
   47.46 +    name = colNames[c]; 
   47.47    }
   47.48    
   47.49 -  void LpSoplex::_setColName(int col, const std::string &name) {
   47.50 -    invColNames.erase(colNames[col]);
   47.51 -    colNames[col] = name; 
   47.52 +  void LpSoplex::_setColName(int c, const std::string &name) {
   47.53 +    invColNames.erase(colNames[c]);
   47.54 +    colNames[c] = name; 
   47.55      if (!name.empty()) {
   47.56 -      invColNames.insert(std::make_pair(name, col));
   47.57 +      invColNames.insert(std::make_pair(name, c));
   47.58      }
   47.59    }
   47.60  
    48.1 --- a/lemon/matrix_maps.h	Fri Mar 02 17:56:22 2007 +0000
    48.2 +++ b/lemon/matrix_maps.h	Fri Mar 02 18:04:28 2007 +0000
    48.3 @@ -349,19 +349,19 @@
    48.4      }
    48.5  
    48.6      virtual void add(const Key& key) {
    48.7 -      if (size(Parent::notifier()->id(key) + 1) >= (int)values.size()) {
    48.8 +      if (size(Parent::notifier()->id(key) + 1) >= int(values.size())) {
    48.9  	values.resize(size(Parent::notifier()->id(key) + 1));	
   48.10        }
   48.11      }
   48.12  
   48.13      virtual void add(const std::vector<Key>& keys) {
   48.14        int new_size = 0;
   48.15 -      for (int i = 0; i < (int)keys.size(); ++i) {
   48.16 +      for (int i = 0; i < int(keys.size()); ++i) {
   48.17          if (size(Parent::notifier()->id(keys[i]) + 1) >= new_size) {
   48.18            new_size = size(Parent::notifier()->id(keys[i]) + 1);	
   48.19          }
   48.20        }
   48.21 -      if (new_size > (int)values.size()) {
   48.22 +      if (new_size > int(values.size())) {
   48.23          values.resize(new_size);
   48.24        }
   48.25      }
   48.26 @@ -504,19 +504,19 @@
   48.27      }
   48.28  
   48.29      virtual void add(const Key& key) {
   48.30 -      if (size(Parent::notifier()->id(key) + 1) >= (int)values.size()) {
   48.31 +      if (size(Parent::notifier()->id(key) + 1) >= int(values.size())) {
   48.32  	values.resize(size(Parent::notifier()->id(key) + 1));	
   48.33        }
   48.34      }
   48.35  
   48.36      virtual void add(const std::vector<Key>& keys) {
   48.37        int new_size = 0;
   48.38 -      for (int i = 0; i < (int)keys.size(); ++i) {
   48.39 +      for (int i = 0; i < int(keys.size()); ++i) {
   48.40          if (size(Parent::notifier()->id(keys[i]) + 1) >= new_size) {
   48.41            new_size = size(Parent::notifier()->id(keys[i]) + 1);	
   48.42          }
   48.43        }
   48.44 -      if (new_size > (int)values.size()) {
   48.45 +      if (new_size > int(values.size())) {
   48.46          values.resize(new_size);
   48.47        }
   48.48      }
   48.49 @@ -915,17 +915,17 @@
   48.50      ///It adds a new FirstKey to the map. It is called by the observer
   48.51      ///class belongs to the FirstKey type.
   48.52      void addFirstKey(const FirstKey& firstKey) {
   48.53 -      int size = (int)values.size();
   48.54 +      int size = int(values.size());
   48.55        if( _first_key_proxy.notifier()->id(firstKey)+1 >= size ){
   48.56          values.resize(_first_key_proxy.notifier()->id(firstKey)+1);
   48.57 -        if( (int)values[0].size() != 0 ){
   48.58 -          int innersize = (int)values[0].size();
   48.59 -          for(int i=size; i!=(int)values.size();++i){
   48.60 +        if( int(values[0].size()) != 0 ){
   48.61 +          int innersize = int(values[0].size());
   48.62 +          for(int i = size; i < int(values.size());++i){
   48.63              (values[i]).resize(innersize);
   48.64            }
   48.65          }else if(_second_key_proxy.notifier()->maxId() >= 0){
   48.66            int innersize = _second_key_proxy.notifier()->maxId();
   48.67 -          for(int i = 0; i != (int)values.size(); ++i){
   48.68 +          for(int i = 0; i < int(values.size()); ++i){
   48.69              values[0].resize(innersize);
   48.70            }
   48.71          }
   48.72 @@ -938,23 +938,23 @@
   48.73      ///observer class belongs to the FirstKey type.
   48.74      void addFirstKeys(const std::vector<FirstKey>& firstKeys){
   48.75        int max = values.size() - 1;
   48.76 -      for(int i=0; i != (int)firstKeys.size(); ++i){
   48.77 +      for(int i = 0; i < int(firstKeys.size()); ++i){
   48.78          int id = _first_key_proxy.notifier()->id(firstKeys[i]);
   48.79          if(max < id){
   48.80            max = id;
   48.81          }
   48.82        }
   48.83 -      int size = (int)values.size();
   48.84 +      int size = int(values.size());
   48.85        if(max >= size){
   48.86          values.resize(max + 1);
   48.87 -        if( (int)values[0].size() != 0){
   48.88 -          int innersize = (int)values[0].size();
   48.89 -          for(int i = size; i != (max + 1); ++i){
   48.90 +        if( int(values[0].size()) != 0){
   48.91 +          int innersize = int(values[0].size());
   48.92 +          for(int i = size; i < (max + 1); ++i){
   48.93              values[i].resize(innersize);
   48.94            }
   48.95          }else if(_second_key_proxy.notifier()->maxId() >= 0){
   48.96            int innersize = _second_key_proxy.notifier()->maxId();
   48.97 -          for(int i = 0; i != (int)values.size(); ++i){
   48.98 +          for(int i = 0; i < int(values.size()); ++i){
   48.99              values[i].resize(innersize);
  48.100            }
  48.101          }
  48.102 @@ -970,8 +970,8 @@
  48.103          return;
  48.104        }
  48.105        int id = _second_key_proxy.notifier()->id(secondKey);
  48.106 -      if(id >= (int)values[0].size()){
  48.107 -        for(int i=0;i!=(int)values.size();++i){
  48.108 +      if(id >= int(values[0].size())){
  48.109 +        for(int i = 0; i < int(values.size());++i){
  48.110            values[i].resize(id+1);
  48.111          }
  48.112        }
  48.113 @@ -986,14 +986,14 @@
  48.114          return;
  48.115        }
  48.116        int max = values[0].size();
  48.117 -      for(int i = 0; i != (int)secondKeys.size(); ++i){
  48.118 +      for(int i = 0; i < int(secondKeys.size()); ++i){
  48.119          int id = _second_key_proxy.notifier()->id(secondKeys[i]);
  48.120          if(max < id){
  48.121            max = id;
  48.122          }
  48.123        }
  48.124 -      if(max > (int)values[0].size()){
  48.125 -        for(int i = 0; i != (int)values.size(); ++i){
  48.126 +      if(max > int(values[0].size())){
  48.127 +        for(int i = 0; i < int(values.size()); ++i){
  48.128            values[i].resize(max + 1);
  48.129          }
  48.130        }
  48.131 @@ -1005,7 +1005,7 @@
  48.132      ///class belongs to the FirstKey type.
  48.133      void eraseFirstKey(const FirstKey& first) {
  48.134        int id = _first_key_proxy.notifier()->id(first);
  48.135 -      for(int i = 0; i != (int)values[id].size(); ++i){
  48.136 +      for(int i = 0; i < int(values[id].size()); ++i){
  48.137          values[id][i] = Value();
  48.138        }
  48.139      }
  48.140 @@ -1015,9 +1015,9 @@
  48.141      ///Erase more FirstKey from the map. It called by the observer
  48.142      ///class belongs to the FirstKey type.
  48.143      void eraseFirstKeys(const std::vector<FirstKey>& firstKeys) {
  48.144 -      for(int j = 0; j != (int)firstKeys.size(); ++j){
  48.145 +      for(int j = 0; j < int(firstKeys.size()); ++j){
  48.146          int id = _first_key_proxy.notifier()->id(firstKeys[j]);
  48.147 -        for(int i = 0; i != (int)values[id].size(); ++i){
  48.148 +        for(int i = 0; i < int(values[id].size()); ++i){
  48.149            values[id][i] = Value();
  48.150          }
  48.151        }
  48.152 @@ -1032,7 +1032,7 @@
  48.153          return;
  48.154        }
  48.155        int id = _second_key_proxy.notifier()->id(second);
  48.156 -      for(int i = 0; i != (int)values.size(); ++i){
  48.157 +      for(int i = 0; i < int(values.size()); ++i){
  48.158          values[i][id] = Value();
  48.159        }
  48.160      }
  48.161 @@ -1045,9 +1045,9 @@
  48.162        if(values.size() == 0){
  48.163          return;
  48.164        }
  48.165 -      for(int j = 0; j != (int)secondKeys.size(); ++j){
  48.166 +      for(int j = 0; j < int(secondKeys.size()); ++j){
  48.167          int id = _second_key_proxy.notifier()->id(secondKeys[j]);
  48.168 -        for(int i = 0; i != (int)values.size(); ++i){
  48.169 +        for(int i = 0; i < int(values.size()); ++i){
  48.170            values[i][id] = Value();
  48.171          }
  48.172        }
  48.173 @@ -1059,7 +1059,7 @@
  48.174      ///to the FirstKey or SecondKey type.
  48.175      void build() {
  48.176        values.resize(_first_key_proxy.notifier()->maxId());
  48.177 -      for(int i=0; i!=(int)values.size(); ++i){
  48.178 +      for(int i = 0; i< int(values.size()); ++i){
  48.179          values[i].resize(_second_key_proxy.notifier()->maxId());
  48.180        }
  48.181      }
  48.182 @@ -1069,7 +1069,7 @@
  48.183      ///It erases all items from the map. It is called by the observer class
  48.184      ///belongs to the FirstKey or SecondKey type.
  48.185      void clear() {
  48.186 -      for(int i=0; i!=(int)values.size(); ++i) {
  48.187 +      for(int i = 0; i < int(values.size()); ++i) {
  48.188          values[i].clear();
  48.189        }
  48.190        values.clear();
    49.1 --- a/lemon/max_matching.h	Fri Mar 02 17:56:22 2007 +0000
    49.2 +++ b/lemon/max_matching.h	Fri Mar 02 18:04:28 2007 +0000
    49.3 @@ -355,7 +355,8 @@
    49.4  
    49.5    template <typename Graph>
    49.6    void MaxMatching<Graph>::lateShrink(Node v, typename Graph::template 
    49.7 -				      NodeMap<Node>& ear, UFE& blossom, UFE& tree) {
    49.8 +				      NodeMap<Node>& ear, UFE& blossom, 
    49.9 +                                      UFE& tree) {
   49.10      //We have one tree which we grow, and also shrink but only if it cannot be
   49.11      //postponed. If we augment then we return to the "for" cycle of
   49.12      //runEdmonds().
   49.13 @@ -372,7 +373,8 @@
   49.14  	Node y=g.runningNode(e);
   49.15  	//growOrAugment grows if y is covered by the matching and
   49.16  	//augments if not. In this latter case it returns 1.
   49.17 -	if ( position[y]==C && growOrAugment(y, x, ear, blossom, tree, Q) ) return;
   49.18 +	if ( position[y]==C && growOrAugment(y, x, ear, blossom, tree, Q) ) 
   49.19 +          return;
   49.20        }
   49.21        R.push(x);
   49.22      }
   49.23 @@ -389,15 +391,16 @@
   49.24  	  shrink( x, y, ear, blossom, tree, Q);	
   49.25  	
   49.26  	while ( !Q.empty() ) {
   49.27 -	  Node x=Q.front();
   49.28 +	  Node z=Q.front();
   49.29  	  Q.pop();
   49.30 -	  for( IncEdgeIt e(g,x); e!= INVALID; ++e ) {
   49.31 -	    Node y=g.runningNode(e);
   49.32 +	  for( IncEdgeIt f(g,z); f!= INVALID; ++f ) {
   49.33 +	    Node w=g.runningNode(f);
   49.34  	    //growOrAugment grows if y is covered by the matching and
   49.35  	    //augments if not. In this latter case it returns 1.
   49.36 -	    if ( position[y]==C && growOrAugment(y, x, ear, blossom, tree, Q) ) return;
   49.37 +	    if ( position[w]==C && growOrAugment(w, z, ear, blossom, tree, Q) )
   49.38 +              return;
   49.39  	  }
   49.40 -	  R.push(x);
   49.41 +	  R.push(z);
   49.42  	}
   49.43        } //for e
   49.44      } // while ( !R.empty() )
    50.1 --- a/lemon/nagamochi_ibaraki.h	Fri Mar 02 17:56:22 2007 +0000
    50.2 +++ b/lemon/nagamochi_ibaraki.h	Fri Mar 02 18:04:28 2007 +0000
    50.3 @@ -438,17 +438,17 @@
    50.4      /// it will allocate one. The destuctor deallocates this
    50.5      /// automatically allocated map, of course.
    50.6      /// \return <tt> (*this) </tt>
    50.7 -    MaxCardinalitySearch &heap(Heap& heap, HeapCrossRef &crossRef) {
    50.8 +    MaxCardinalitySearch &heap(Heap& hp, HeapCrossRef &cr) {
    50.9        if(local_heap_cross_ref) {
   50.10  	delete _heap_cross_ref;
   50.11  	local_heap_cross_ref = false;
   50.12        }
   50.13 -      _heap_cross_ref = &crossRef;
   50.14 +      _heap_cross_ref = &cr;
   50.15        if(local_heap) {
   50.16  	delete _heap;
   50.17  	local_heap = false;
   50.18        }
   50.19 -      _heap = &heap;
   50.20 +      _heap = &hp;
   50.21        return *this;
   50.22      }
   50.23  
   50.24 @@ -1168,18 +1168,18 @@
   50.25      /// it will allocate one. The destuctor deallocates this
   50.26      /// automatically allocated heap and cross reference, of course.
   50.27      /// \return <tt> (*this) </tt>
   50.28 -    NagamochiIbaraki &heap(Heap& heap, HeapCrossRef &crossRef)
   50.29 +    NagamochiIbaraki &heap(Heap& hp, HeapCrossRef &cr)
   50.30      {
   50.31        if (local_heap_cross_ref) {
   50.32  	delete _heap_cross_ref;
   50.33  	local_heap_cross_ref=false;
   50.34        }
   50.35 -      _heap_cross_ref = &crossRef;
   50.36 +      _heap_cross_ref = &cr;
   50.37        if (local_heap) {
   50.38  	delete _heap;
   50.39  	local_heap=false;
   50.40        }
   50.41 -      _heap = &heap;
   50.42 +      _heap = &hp;
   50.43        return *this;
   50.44      }
   50.45  
   50.46 @@ -1318,11 +1318,11 @@
   50.47          }
   50.48        }
   50.49  
   50.50 -      if ((int)nodes.size() < _node_num) {
   50.51 +      if (int(nodes.size()) < _node_num) {
   50.52          _aux_graph->clear();
   50.53          _node_num = 1;
   50.54          _cut.clear();
   50.55 -        for (int i = 0; i < (int)nodes.size(); ++i) {
   50.56 +        for (int i = 0; i < int(nodes.size()); ++i) {
   50.57            typename Graph::Node n = (*_first)[nodes[i]];
   50.58            while (n != INVALID) {
   50.59              _cut.push_back(n);
   50.60 @@ -1360,7 +1360,8 @@
   50.61          }
   50.62        }
   50.63  
   50.64 -      if (ufe.size((typename Ufe::ClassIt)(ufe)) == _node_num) {
   50.65 +      typedef typename Ufe::ClassIt UfeCIt;
   50.66 +      if (ufe.size(UfeCIt(ufe)) == _node_num) {
   50.67          _aux_graph->clear();
   50.68          _node_num = 1;
   50.69          return true;
   50.70 @@ -1372,7 +1373,7 @@
   50.71        for (typename Ufe::ClassIt c(ufe); c != INVALID; ++c) {
   50.72          if (ufe.size(c) == 1) continue;
   50.73          for (typename Ufe::ItemIt r(ufe, c); r != INVALID; ++r) {
   50.74 -          if ((Node)r == (Node)c) continue;
   50.75 +          if (static_cast<Node>(r) == static_cast<Node>(c)) continue;
   50.76            _next->set((*_last)[c], (*_first)[r]);
   50.77            _last->set(c, (*_last)[r]);
   50.78            remnodes.push_back(r);
   50.79 @@ -1407,7 +1408,7 @@
   50.80          remedges.push_back(e);
   50.81        }
   50.82  
   50.83 -      for (int i = 0; i < (int)remedges.size(); ++i) {
   50.84 +      for (int i = 0; i < int(remedges.size()); ++i) {
   50.85          _aux_graph->erase(remedges[i]);
   50.86        }
   50.87  
   50.88 @@ -1415,12 +1416,12 @@
   50.89  
   50.90        {
   50.91          int i = 0;
   50.92 -        while (i < (int)addedges.size()) {
   50.93 +        while (i < int(addedges.size())) {
   50.94            Node sn = addedges[i].source;
   50.95            Node tn = addedges[i].target;
   50.96            Value ec = addedges[i].capacity;
   50.97            ++i;
   50.98 -          while (i < (int)addedges.size() && 
   50.99 +          while (i < int(addedges.size()) && 
  50.100                   sn == addedges[i].source && tn == addedges[i].target) {
  50.101              ec += addedges[i].capacity;
  50.102              ++i;
  50.103 @@ -1442,7 +1443,7 @@
  50.104          
  50.105        }
  50.106  
  50.107 -      for (int i = 0; i < (int)remnodes.size(); ++i) {
  50.108 +      for (int i = 0; i < int(remnodes.size()); ++i) {
  50.109          _aux_graph->erase(remnodes[i]);
  50.110        }
  50.111  
  50.112 @@ -1500,7 +1501,7 @@
  50.113      /// map have been set false previously. 
  50.114      template <typename NodeMap>
  50.115      Value quickMinCut(NodeMap& nodeMap) const { 
  50.116 -      for (int i = 0; i < (int)_cut.size(); ++i) {
  50.117 +      for (int i = 0; i < int(_cut.size()); ++i) {
  50.118          nodeMap.set(_cut[i], true);
  50.119        }
  50.120        return minCut();
    51.1 --- a/lemon/path.h	Fri Mar 02 17:56:22 2007 +0000
    51.2 +++ b/lemon/path.h	Fri Mar 02 18:04:28 2007 +0000
    51.3 @@ -140,7 +140,7 @@
    51.4      ///
    51.5      /// \pre n is in the [0..length() - 1] range
    51.6      const Edge& nth(int n) const {
    51.7 -      return n < (int)head.size() ? *(head.rbegin() + n) :
    51.8 +      return n < int(head.size()) ? *(head.rbegin() + n) :
    51.9          *(tail.begin() + (n - head.size()));
   51.10      }
   51.11  
    52.1 --- a/lemon/polynomial.h	Fri Mar 02 17:56:22 2007 +0000
    52.2 +++ b/lemon/polynomial.h	Fri Mar 02 18:04:28 2007 +0000
    52.3 @@ -50,7 +50,7 @@
    52.4      ///\e
    52.5      template<class U> Polynomial(const Polynomial<U> &u) : _coeff(u.deg()+1)
    52.6      {
    52.7 -      for(int i=0;i<(int)_coeff.size();i++) _coeff[i]=u[i];
    52.8 +      for(int i=0;i<int(_coeff.size());i++) _coeff[i]=u[i];
    52.9      }
   52.10      ///Query the degree of the polynomial.
   52.11      
   52.12 @@ -111,7 +111,7 @@
   52.13      ///Derivate the polynomial (in place)
   52.14      Polynomial &derivateMyself()
   52.15      {
   52.16 -      for(int i=1;i<(int)_coeff.size();i++) _coeff[i-1]=i*_coeff[i];
   52.17 +      for(int i=1;i<int(_coeff.size());i++) _coeff[i-1]=i*_coeff[i];
   52.18        _coeff.pop_back();
   52.19        return *this;
   52.20      }
   52.21 @@ -120,7 +120,7 @@
   52.22      Polynomial derivate() const
   52.23      {
   52.24        Polynomial tmp(deg()-1);
   52.25 -      for(int i=1;i<(int)_coeff.size();i++) tmp[i-1]=i*_coeff[i];
   52.26 +      for(int i=1;i<int(_coeff.size());i++) tmp[i-1]=i*_coeff[i];
   52.27        return tmp;
   52.28      }
   52.29  
   52.30 @@ -138,7 +138,7 @@
   52.31      {
   52.32        Polynomial tmp(deg()+1);
   52.33        tmp[0]=0;
   52.34 -      for(int i=0;i<(int)_coeff.size();i++) tmp[i+1]=_coeff[i]/(i+1);
   52.35 +      for(int i=0;i<int(_coeff.size());i++) tmp[i+1]=_coeff[i]/(i+1);
   52.36        return tmp;
   52.37      }
   52.38  
   52.39 @@ -147,7 +147,7 @@
   52.40      Polynomial &operator+=(const Polynomial<U> &p)
   52.41      {
   52.42        if(p.deg()>deg()) _coeff.resize(p.deg()+1);
   52.43 -      for(int i=0;i<=(int)std::min(deg(),p.deg());i++)
   52.44 +      for(int i=0;i<=int(std::min(deg(),p.deg()));i++)
   52.45  	_coeff[i]+=p[i];
   52.46        return *this;
   52.47      }
    53.1 --- a/lemon/preflow.h	Fri Mar 02 17:56:22 2007 +0000
    53.2 +++ b/lemon/preflow.h	Fri Mar 02 18:04:28 2007 +0000
    53.3 @@ -234,8 +234,8 @@
    53.4      ///give minimum value cuts unless calling \ref phase2().
    53.5      void phase1()
    53.6      {
    53.7 -      int heur0=(int)(H0*_node_num);  //time while running 'bound decrease'
    53.8 -      int heur1=(int)(H1*_node_num);  //time while running 'highest label'
    53.9 +      int heur0=int(H0*_node_num);  //time while running 'bound decrease'
   53.10 +      int heur1=int(H1*_node_num);  //time while running 'highest label'
   53.11        int heur=heur1;         //starting time interval (#of relabels)
   53.12        int numrelabel=0;
   53.13  
    54.1 --- a/lemon/radix_heap.h	Fri Mar 02 17:56:22 2007 +0000
    54.2 +++ b/lemon/radix_heap.h	Fri Mar 02 18:04:28 2007 +0000
    54.3 @@ -150,12 +150,12 @@
    54.4  
    54.5    private:
    54.6  
    54.7 -    bool upper(int box, Prio prio) {
    54.8 -      return prio < boxes[box].min;
    54.9 +    bool upper(int box, Prio pr) {
   54.10 +      return pr < boxes[box].min;
   54.11      }
   54.12  
   54.13 -    bool lower(int box, Prio prio) {
   54.14 -      return prio >= boxes[box].min + boxes[box].size;
   54.15 +    bool lower(int box, Prio pr) {
   54.16 +      return pr >= boxes[box].min + boxes[box].size;
   54.17      }
   54.18  
   54.19      /// \brief Remove item from the box list.
   54.20 @@ -187,8 +187,8 @@
   54.21      /// \brief Add a new box to the box list.
   54.22      void extend() {
   54.23        int min = boxes.back().min + boxes.back().size;
   54.24 -      int size = 2 * boxes.back().size;
   54.25 -      boxes.push_back(RadixBox(min, size));
   54.26 +      int bs = 2 * boxes.back().size;
   54.27 +      boxes.push_back(RadixBox(min, bs));
   54.28      }
   54.29  
   54.30      /// \brief Move an item up into the proper box.
   54.31 @@ -200,9 +200,9 @@
   54.32      }
   54.33  
   54.34      /// \brief Find up the proper box for the item with the given prio.
   54.35 -    int findUp(int start, int prio) {
   54.36 -      while (lower(start, prio)) {
   54.37 -	if (++start == (int)boxes.size()) {
   54.38 +    int findUp(int start, int pr) {
   54.39 +      while (lower(start, pr)) {
   54.40 +	if (++start == int(boxes.size())) {
   54.41  	  extend();
   54.42  	}
   54.43        }
   54.44 @@ -218,8 +218,8 @@
   54.45      }
   54.46  
   54.47      /// \brief Find up the proper box for the item with the given prio.
   54.48 -    int findDown(int start, int prio) {
   54.49 -      while (upper(start, prio)) {
   54.50 +    int findDown(int start, int pr) {
   54.51 +      while (upper(start, pr)) {
   54.52  	if (--start < 0) throw UnderFlowPriorityError();
   54.53        }
   54.54        return start;
   54.55 @@ -260,7 +260,7 @@
   54.56      }
   54.57  
   54.58      void relocate_last(int index) {
   54.59 -      if (index != (int)data.size() - 1) {
   54.60 +      if (index != int(data.size()) - 1) {
   54.61  	data[index] = data.back();
   54.62  	if (data[index].prev != -1) {
   54.63  	  data[data[index].prev].next = index;
    55.1 --- a/lemon/radix_sort.h	Fri Mar 02 17:56:22 2007 +0000
    55.2 +++ b/lemon/radix_sort.h	Fri Mar 02 18:04:28 2007 +0000
    55.3 @@ -264,7 +264,7 @@
    55.4    void counterIntroSort(Key *first, Key *last, Key *target, 
    55.5  		       int byte, Functor functor) {
    55.6      const int size = 
    55.7 -      (unsigned int)std::numeric_limits<unsigned char>::max() + 1;
    55.8 +      unsigned(std::numeric_limits<unsigned char>::max()) + 1;
    55.9      std::vector<int> counter(size);
   55.10      for (int i = 0; i < size; ++i) {
   55.11        counter[i] = 0;
   55.12 @@ -290,7 +290,7 @@
   55.13    void signedCounterIntroSort(Key *first, Key *last, Key *target, 
   55.14  			     int byte, Functor functor) {
   55.15      const int size = 
   55.16 -      (unsigned int)std::numeric_limits<unsigned char>::max() + 1;
   55.17 +      unsigned(std::numeric_limits<unsigned char>::max()) + 1;
   55.18      std::vector<int> counter(size);
   55.19      for (int i = 0; i < size; ++i) {
   55.20        counter[i] = 0;
   55.21 @@ -330,7 +330,7 @@
   55.22      try {
   55.23        bool dir = true;
   55.24        std::copy(first, last, buffer);
   55.25 -      for (int i = 0; i < (int)sizeof(Value) - 1; ++i) {
   55.26 +      for (int i = 0; i < int(sizeof(Value)) - 1; ++i) {
   55.27  	if (dir) {
   55.28  	  counterIntroSort(buffer, buffer + length, buffer + length, 
   55.29  			   i, functor);
   55.30 @@ -368,7 +368,7 @@
   55.31      try {
   55.32        bool dir = true;
   55.33        std::copy(first, last, buffer);
   55.34 -      for (int i = 0; i < (int)sizeof(Value); ++i) {
   55.35 +      for (int i = 0; i < int(sizeof(Value)); ++i) {
   55.36  	if (dir) {
   55.37  	  counterIntroSort(buffer, buffer + length, 
   55.38                             buffer + length, i, functor);
    56.1 --- a/lemon/random.h	Fri Mar 02 17:56:22 2007 +0000
    56.2 +++ b/lemon/random.h	Fri Mar 02 18:04:28 2007 +0000
    56.3 @@ -121,19 +121,19 @@
    56.4        static const int length = 312;
    56.5        static const int shift = 156;
    56.6  
    56.7 -      static const Word mul = (Word)0x5851F42Du << 32 | (Word)0x4C957F2Du;
    56.8 -      static const Word arrayInit = (Word)0x00000000u << 32 |(Word)0x012BD6AAu;
    56.9 -      static const Word arrayMul1 = (Word)0x369DEA0Fu << 32 |(Word)0x31A53F85u;
   56.10 -      static const Word arrayMul2 = (Word)0x27BB2EE6u << 32 |(Word)0x87B0B0FDu;
   56.11 +      static const Word mul = Word(0x5851F42Du) << 32 | Word(0x4C957F2Du);
   56.12 +      static const Word arrayInit = Word(0x00000000u) << 32 |Word(0x012BD6AAu);
   56.13 +      static const Word arrayMul1 = Word(0x369DEA0Fu) << 32 |Word(0x31A53F85u);
   56.14 +      static const Word arrayMul2 = Word(0x27BB2EE6u) << 32 |Word(0x87B0B0FDu);
   56.15  
   56.16 -      static const Word mask = (Word)0xB5026F5Au << 32 | (Word)0xA96619E9u;
   56.17 -      static const Word loMask = ((Word)1u << 31) - 1;
   56.18 +      static const Word mask = Word(0xB5026F5Au) << 32 | Word(0xA96619E9u);
   56.19 +      static const Word loMask = (Word(1u) << 31) - 1;
   56.20        static const Word hiMask = ~loMask;
   56.21  
   56.22        static Word tempering(Word rnd) {
   56.23 -        rnd ^= (rnd >> 29) & ((Word)0x55555555u << 32 | (Word)0x55555555u);
   56.24 -        rnd ^= (rnd << 17) & ((Word)0x71D67FFFu << 32 | (Word)0xEDA60000u);
   56.25 -        rnd ^= (rnd << 37) & ((Word)0xFFF7EEE0u << 32 | (Word)0x00000000u);
   56.26 +        rnd ^= (rnd >> 29) & (Word(0x55555555u) << 32 | Word(0x55555555u));
   56.27 +        rnd ^= (rnd << 17) & (Word(0x71D67FFFu) << 32 | Word(0xEDA60000u));
   56.28 +        rnd ^= (rnd << 37) & (Word(0xFFF7EEE0u) << 32 | Word(0x00000000u));
   56.29          rnd ^= (rnd >> 43);
   56.30          return rnd;
   56.31        }
   56.32 @@ -216,7 +216,7 @@
   56.33            }
   56.34          }
   56.35          
   56.36 -        state[length - 1] = (Word)1 << (bits - 1);
   56.37 +        state[length - 1] = Word(1) << (bits - 1);
   56.38        }
   56.39        
   56.40        void copyState(const RandomCore& other) {
   56.41 @@ -273,14 +273,14 @@
   56.42      struct Masker {
   56.43        static Result mask(const Result& result) {
   56.44          return Masker<Result, (shift + 1) / 2>::
   56.45 -          mask((Result)(result | (result >> shift)));
   56.46 +          mask(static_cast<Result>(result | (result >> shift)));
   56.47        }
   56.48      };
   56.49      
   56.50      template <typename Result>
   56.51      struct Masker<Result, 1> {
   56.52        static Result mask(const Result& result) {
   56.53 -        return (Result)(result | (result >> 1));
   56.54 +        return static_cast<Result>(result | (result >> 1));
   56.55        }
   56.56      };
   56.57  
   56.58 @@ -291,7 +291,7 @@
   56.59        static const int bits = std::numeric_limits<Word>::digits;
   56.60      
   56.61        static Result convert(RandomCore<Word>& rnd) {
   56.62 -        return (Result)(rnd() >> (bits - rest)) << shift;
   56.63 +        return static_cast<Result>(rnd() >> (bits - rest)) << shift;
   56.64        }
   56.65        
   56.66      }; 
   56.67 @@ -301,7 +301,7 @@
   56.68        static const int bits = std::numeric_limits<Word>::digits;
   56.69  
   56.70        static Result convert(RandomCore<Word>& rnd) {
   56.71 -        return ((Result)rnd() << shift) | 
   56.72 +        return (static_cast<Result>(rnd()) << shift) | 
   56.73            IntConversion<Result, Word, rest - bits, shift + bits>::convert(rnd);
   56.74        }
   56.75      };
   56.76 @@ -312,7 +312,7 @@
   56.77                                std::numeric_limits<Result>::digits>
   56.78      struct Mapping {
   56.79        static Result map(RandomCore<Word>& rnd, const Result& bound) {
   56.80 -        Word max = (Word)(bound - 1);
   56.81 +        Word max = Word(bound - 1);
   56.82          Result mask = Masker<Result>::mask(bound - 1);
   56.83          Result num;
   56.84          do {
   56.85 @@ -325,7 +325,7 @@
   56.86      template <typename Result, typename Word>
   56.87      struct Mapping<Result, Word, false> {
   56.88        static Result map(RandomCore<Word>& rnd, const Result& bound) {
   56.89 -        Word max = (Word)(bound - 1);
   56.90 +        Word max = Word(bound - 1);
   56.91          Word mask = Masker<Word, (std::numeric_limits<Result>::digits + 1) / 2>
   56.92            ::mask(max);
   56.93          Word num;
   56.94 @@ -341,7 +341,7 @@
   56.95        static const Result multiplier() {
   56.96          Result res = ShiftMultiplier<Result, exp / 2>::multiplier();
   56.97          res *= res;
   56.98 -        if ((exp & 1) == 1) res *= (Result)2.0;
   56.99 +        if ((exp & 1) == 1) res *= static_cast<Result>(2.0);
  56.100          return res; 
  56.101        }
  56.102      };
  56.103 @@ -351,7 +351,7 @@
  56.104        static const Result multiplier() {
  56.105          Result res = ShiftMultiplier<Result, exp / 2>::multiplier();
  56.106          res *= res;
  56.107 -        if ((exp & 1) == 1) res *= (Result)0.5;
  56.108 +        if ((exp & 1) == 1) res *= static_cast<Result>(0.5);
  56.109          return res; 
  56.110        }
  56.111      };
  56.112 @@ -359,35 +359,35 @@
  56.113      template <typename Result>
  56.114      struct ShiftMultiplier<Result, 0, true> {
  56.115        static const Result multiplier() {
  56.116 -        return (Result)1.0; 
  56.117 +        return static_cast<Result>(1.0); 
  56.118        }
  56.119      };
  56.120  
  56.121      template <typename Result>
  56.122      struct ShiftMultiplier<Result, -20, true> {
  56.123        static const Result multiplier() {
  56.124 -        return (Result)(1.0/1048576.0); 
  56.125 +        return static_cast<Result>(1.0/1048576.0); 
  56.126        }
  56.127      };
  56.128      
  56.129      template <typename Result>
  56.130      struct ShiftMultiplier<Result, -32, true> {
  56.131        static const Result multiplier() {
  56.132 -        return (Result)(1.0/424967296.0); 
  56.133 +        return static_cast<Result>(1.0/424967296.0); 
  56.134        }
  56.135      };
  56.136  
  56.137      template <typename Result>
  56.138      struct ShiftMultiplier<Result, -53, true> {
  56.139        static const Result multiplier() {
  56.140 -        return (Result)(1.0/9007199254740992.0); 
  56.141 +        return static_cast<Result>(1.0/9007199254740992.0); 
  56.142        }
  56.143      };
  56.144  
  56.145      template <typename Result>
  56.146      struct ShiftMultiplier<Result, -64, true> {
  56.147        static const Result multiplier() {
  56.148 -        return (Result)(1.0/18446744073709551616.0); 
  56.149 +        return static_cast<Result>(1.0/18446744073709551616.0); 
  56.150        }
  56.151      };
  56.152  
  56.153 @@ -406,7 +406,7 @@
  56.154  
  56.155        static Result convert(RandomCore<Word>& rnd) {
  56.156          return Shifting<Result, - shift - rest>::
  56.157 -          shift((Result)(rnd() >> (bits - rest)));
  56.158 +          shift(static_cast<Result>(rnd() >> (bits - rest)));
  56.159        }
  56.160      };
  56.161  
  56.162 @@ -415,8 +415,10 @@
  56.163        static const int bits = std::numeric_limits<Word>::digits;
  56.164  
  56.165        static Result convert(RandomCore<Word>& rnd) {
  56.166 -        return Shifting<Result, - shift - bits>::shift((Result)rnd()) +
  56.167 -          RealConversion<Result, Word, rest-bits, shift + bits>::convert(rnd);
  56.168 +        return Shifting<Result, - shift - bits>::
  56.169 +          shift(static_cast<Result>(rnd())) +
  56.170 +          RealConversion<Result, Word, rest-bits, shift + bits>::
  56.171 +          convert(rnd);
  56.172        }
  56.173      };
  56.174  
  56.175 @@ -427,7 +429,7 @@
  56.176        static void init(RandomCore<Word>& rnd, Iterator begin, Iterator end) {
  56.177          std::vector<Word> ws;
  56.178          for (Iterator it = begin; it != end; ++it) {
  56.179 -          ws.push_back((Word)*it);
  56.180 +          ws.push_back(Word(*it));
  56.181          }
  56.182          rnd.initState(ws.begin(), ws.end());
  56.183        }
    57.1 --- a/lemon/smart_graph.h	Fri Mar 02 17:56:22 2007 +0000
    57.2 +++ b/lemon/smart_graph.h	Fri Mar 02 18:04:28 2007 +0000
    57.3 @@ -641,7 +641,7 @@
    57.4  
    57.5      void saveSnapshot(Snapshot &s)
    57.6      {
    57.7 -      s.g = this;
    57.8 +      s.graph = this;
    57.9        s.node_num = nodes.size();
   57.10        s.edge_num = edges.size();
   57.11      }
   57.12 @@ -688,7 +688,7 @@
   57.13      ///the validity of the snapshot is not stored.
   57.14      class Snapshot 
   57.15      {
   57.16 -      SmartUGraph *g;
   57.17 +      SmartUGraph *graph;
   57.18      protected:
   57.19        friend class SmartUGraph;
   57.20        unsigned int node_num;
   57.21 @@ -699,7 +699,7 @@
   57.22        ///Default constructor.
   57.23        ///To actually make a snapshot you must call save().
   57.24        ///
   57.25 -      Snapshot() : g(0) {}
   57.26 +      Snapshot() : graph(0) {}
   57.27        ///Constructor that immediately makes a snapshot
   57.28        
   57.29        ///This constructor immediately makes a snapshot of the graph.
   57.30 @@ -729,7 +729,7 @@
   57.31        ///by restore().
   57.32        void restore()
   57.33        {
   57.34 -        g->restoreSnapshot(*this);
   57.35 +        graph->restoreSnapshot(*this);
   57.36        }
   57.37      };
   57.38    };
    58.1 --- a/lemon/steiner.h	Fri Mar 02 17:56:22 2007 +0000
    58.2 +++ b/lemon/steiner.h	Fri Mar 02 18:04:28 2007 +0000
    58.3 @@ -204,13 +204,13 @@
    58.4        SmartUGraph::UEdgeMap<UEdge> cross(aux_graph);
    58.5        {
    58.6          int i = 0;
    58.7 -        while (i < (int)externals.size()) {
    58.8 +        while (i < int(externals.size())) {
    58.9            int sn = externals[i].source;
   58.10            int tn = externals[i].target;
   58.11            Value ev = externals[i].value;
   58.12            UEdge ee = externals[i].uedge;
   58.13            ++i;
   58.14 -          while (i < (int)externals.size() && 
   58.15 +          while (i < int(externals.size()) && 
   58.16                   sn == externals[i].source && tn == externals[i].target) {
   58.17              if (externals[i].value < ev) {
   58.18                ev = externals[i].value;
    59.1 --- a/lemon/ugraph_adaptor.h	Fri Mar 02 17:56:22 2007 +0000
    59.2 +++ b/lemon/ugraph_adaptor.h	Fri Mar 02 18:04:28 2007 +0000
    59.3 @@ -99,18 +99,18 @@
    59.4      int uEdgeNum() const { return graph->uEdgeNum(); }
    59.5  
    59.6      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
    59.7 -    Edge findEdge(const Node& source, const Node& target, 
    59.8 +    Edge findEdge(const Node& u, const Node& v, 
    59.9  		  const Edge& prev = INVALID) {
   59.10 -      return graph->findEdge(source, target, prev);
   59.11 +      return graph->findEdge(u, v, prev);
   59.12      }
   59.13 -    UEdge findUEdge(const Node& source, const Node& target, 
   59.14 +    UEdge findUEdge(const Node& u, const Node& v, 
   59.15                      const UEdge& prev = INVALID) {
   59.16 -      return graph->findUEdge(source, target, prev);
   59.17 +      return graph->findUEdge(u, v, prev);
   59.18      }
   59.19    
   59.20      Node addNode() const { return graph->addNode(); }
   59.21 -    UEdge addEdge(const Node& source, const Node& target) const { 
   59.22 -      return graph->addEdge(source, target); 
   59.23 +    UEdge addEdge(const Node& u, const Node& v) const { 
   59.24 +      return graph->addEdge(u, v); 
   59.25      }
   59.26  
   59.27      void erase(const Node& i) const { graph->erase(i); }
   59.28 @@ -125,16 +125,16 @@
   59.29      int id(const Edge& e) const { return graph->id(e); }
   59.30      int id(const UEdge& e) const { return graph->id(e); }
   59.31  
   59.32 -    Node fromNodeId(int id) const {
   59.33 -      return graph->fromNodeId(id);
   59.34 +    Node fromNodeId(int ix) const {
   59.35 +      return graph->fromNodeId(ix);
   59.36      }
   59.37  
   59.38 -    Edge fromEdgeId(int id) const {
   59.39 -      return graph->fromEdgeId(id);
   59.40 +    Edge fromEdgeId(int ix) const {
   59.41 +      return graph->fromEdgeId(ix);
   59.42      }
   59.43  
   59.44 -    UEdge fromUEdgeId(int id) const {
   59.45 -      return graph->fromUEdgeId(id);
   59.46 +    UEdge fromUEdgeId(int ix) const {
   59.47 +      return graph->fromUEdgeId(ix);
   59.48      }
   59.49  
   59.50      int maxNodeId() const {
   59.51 @@ -395,25 +395,25 @@
   59.52      typedef False EdgeNumTag;
   59.53  
   59.54      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
   59.55 -    Edge findEdge(const Node& source, const Node& target, 
   59.56 +    Edge findEdge(const Node& u, const Node& v, 
   59.57  		  const Edge& prev = INVALID) {
   59.58 -      if (!(*node_filter_map)[source] || !(*node_filter_map)[target]) {
   59.59 +      if (!(*node_filter_map)[u] || !(*node_filter_map)[v]) {
   59.60          return INVALID;
   59.61        }
   59.62 -      Edge edge = Parent::findEdge(source, target, prev);
   59.63 +      Edge edge = Parent::findEdge(u, v, prev);
   59.64        while (edge != INVALID && !(*uedge_filter_map)[edge]) {
   59.65 -        edge = Parent::findEdge(source, target, edge);
   59.66 +        edge = Parent::findEdge(u, v, edge);
   59.67        }
   59.68        return edge;
   59.69      }
   59.70 -    UEdge findUEdge(const Node& source, const Node& target, 
   59.71 +    UEdge findUEdge(const Node& u, const Node& v, 
   59.72  		  const UEdge& prev = INVALID) {
   59.73 -      if (!(*node_filter_map)[source] || !(*node_filter_map)[target]) {
   59.74 +      if (!(*node_filter_map)[u] || !(*node_filter_map)[v]) {
   59.75          return INVALID;
   59.76        }
   59.77 -      UEdge uedge = Parent::findUEdge(source, target, prev);
   59.78 +      UEdge uedge = Parent::findUEdge(u, v, prev);
   59.79        while (uedge != INVALID && !(*uedge_filter_map)[uedge]) {
   59.80 -        uedge = Parent::findUEdge(source, target, uedge);
   59.81 +        uedge = Parent::findUEdge(u, v, uedge);
   59.82        }
   59.83        return uedge;
   59.84      }
   59.85 @@ -428,10 +428,10 @@
   59.86        typedef SubMapExtender<Adaptor, typename Parent::
   59.87                               template NodeMap<_Value> > Parent;
   59.88      
   59.89 -      NodeMap(const Graph& graph) 
   59.90 -	: Parent(graph) {}
   59.91 -      NodeMap(const Graph& graph, const _Value& value) 
   59.92 -	: Parent(graph, value) {}
   59.93 +      NodeMap(const Graph& g) 
   59.94 +	: Parent(g) {}
   59.95 +      NodeMap(const Graph& g, const _Value& v) 
   59.96 +	: Parent(g, v) {}
   59.97      
   59.98        NodeMap& operator=(const NodeMap& cmap) {
   59.99  	return operator=<NodeMap>(cmap);
  59.100 @@ -454,10 +454,10 @@
  59.101        typedef SubMapExtender<Adaptor, typename Parent::
  59.102                               template EdgeMap<_Value> > Parent;
  59.103      
  59.104 -      EdgeMap(const Graph& graph) 
  59.105 -	: Parent(graph) {}
  59.106 -      EdgeMap(const Graph& graph, const _Value& value) 
  59.107 -	: Parent(graph, value) {}
  59.108 +      EdgeMap(const Graph& g) 
  59.109 +	: Parent(g) {}
  59.110 +      EdgeMap(const Graph& g, const _Value& v) 
  59.111 +	: Parent(g, v) {}
  59.112      
  59.113        EdgeMap& operator=(const EdgeMap& cmap) {
  59.114  	return operator=<EdgeMap>(cmap);
  59.115 @@ -480,10 +480,10 @@
  59.116        typedef SubMapExtender<Adaptor, typename Parent::
  59.117                               template UEdgeMap<_Value> > Parent;
  59.118      
  59.119 -      UEdgeMap(const Graph& graph) 
  59.120 -	: Parent(graph) {}
  59.121 -      UEdgeMap(const Graph& graph, const _Value& value) 
  59.122 -	: Parent(graph, value) {}
  59.123 +      UEdgeMap(const Graph& g) 
  59.124 +	: Parent(g) {}
  59.125 +      UEdgeMap(const Graph& g, const _Value& v) 
  59.126 +	: Parent(g, v) {}
  59.127      
  59.128        UEdgeMap& operator=(const UEdgeMap& cmap) {
  59.129  	return operator=<UEdgeMap>(cmap);
  59.130 @@ -622,19 +622,19 @@
  59.131      typedef False EdgeNumTag;
  59.132  
  59.133      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
  59.134 -    Edge findEdge(const Node& source, const Node& target, 
  59.135 +    Edge findEdge(const Node& u, const Node& v, 
  59.136  		  const Edge& prev = INVALID) {
  59.137 -      Edge edge = Parent::findEdge(source, target, prev);
  59.138 +      Edge edge = Parent::findEdge(u, v, prev);
  59.139        while (edge != INVALID && !(*uedge_filter_map)[edge]) {
  59.140 -        edge = Parent::findEdge(source, target, edge);
  59.141 +        edge = Parent::findEdge(u, v, edge);
  59.142        }
  59.143        return edge;
  59.144      }
  59.145 -    UEdge findUEdge(const Node& source, const Node& target, 
  59.146 +    UEdge findUEdge(const Node& u, const Node& v, 
  59.147  		  const UEdge& prev = INVALID) {
  59.148 -      UEdge uedge = Parent::findUEdge(source, target, prev);
  59.149 +      UEdge uedge = Parent::findUEdge(u, v, prev);
  59.150        while (uedge != INVALID && !(*uedge_filter_map)[uedge]) {
  59.151 -        uedge = Parent::findUEdge(source, target, uedge);
  59.152 +        uedge = Parent::findUEdge(u, v, uedge);
  59.153        }
  59.154        return uedge;
  59.155      }
  59.156 @@ -649,10 +649,10 @@
  59.157        typedef SubMapExtender<Adaptor, typename Parent::
  59.158                               template NodeMap<_Value> > Parent;
  59.159      
  59.160 -      NodeMap(const Graph& graph) 
  59.161 -	: Parent(graph) {}
  59.162 -      NodeMap(const Graph& graph, const _Value& value) 
  59.163 -	: Parent(graph, value) {}
  59.164 +      NodeMap(const Graph& g) 
  59.165 +	: Parent(g) {}
  59.166 +      NodeMap(const Graph& g, const _Value& v) 
  59.167 +	: Parent(g, v) {}
  59.168      
  59.169        NodeMap& operator=(const NodeMap& cmap) {
  59.170  	return operator=<NodeMap>(cmap);
  59.171 @@ -675,10 +675,10 @@
  59.172        typedef SubMapExtender<Adaptor, typename Parent::
  59.173                               template EdgeMap<_Value> > Parent;
  59.174      
  59.175 -      EdgeMap(const Graph& graph) 
  59.176 -	: Parent(graph) {}
  59.177 -      EdgeMap(const Graph& graph, const _Value& value) 
  59.178 -	: Parent(graph, value) {}
  59.179 +      EdgeMap(const Graph& g) 
  59.180 +	: Parent(g) {}
  59.181 +      EdgeMap(const Graph& g, const _Value& v) 
  59.182 +	: Parent(g, v) {}
  59.183      
  59.184        EdgeMap& operator=(const EdgeMap& cmap) {
  59.185  	return operator=<EdgeMap>(cmap);
  59.186 @@ -701,10 +701,10 @@
  59.187        typedef SubMapExtender<Adaptor, typename Parent::
  59.188                               template UEdgeMap<_Value> > Parent;
  59.189      
  59.190 -      UEdgeMap(const Graph& graph) 
  59.191 -	: Parent(graph) {}
  59.192 -      UEdgeMap(const Graph& graph, const _Value& value) 
  59.193 -	: Parent(graph, value) {}
  59.194 +      UEdgeMap(const Graph& g) 
  59.195 +	: Parent(g) {}
  59.196 +      UEdgeMap(const Graph& g, const _Value& v) 
  59.197 +	: Parent(g, v) {}
  59.198      
  59.199        UEdgeMap& operator=(const UEdgeMap& cmap) {
  59.200  	return operator=<UEdgeMap>(cmap);
  59.201 @@ -943,20 +943,20 @@
  59.202      int edgeNum() const { return graph->uEdgeNum(); }
  59.203  
  59.204      typedef FindEdgeTagIndicator<Graph> FindEdgeTag;
  59.205 -    Edge findEdge(const Node& source, const Node& target, 
  59.206 +    Edge findEdge(const Node& u, const Node& v, 
  59.207  		  const Edge& prev = INVALID) {
  59.208        Edge edge = prev;
  59.209        bool d = edge == INVALID ? true : (*direction)[edge];
  59.210        if (d) {
  59.211 -        edge = graph->findUEdge(source, target, edge);
  59.212 +        edge = graph->findUEdge(u, v, edge);
  59.213          while (edge != INVALID && !(*direction)[edge]) {
  59.214 -          graph->findUEdge(source, target, edge);
  59.215 +          graph->findUEdge(u, v, edge);
  59.216          }
  59.217          if (edge != INVALID) return edge;
  59.218        }
  59.219 -      graph->findUEdge(target, source, edge);
  59.220 +      graph->findUEdge(v, u, edge);
  59.221        while (edge != INVALID && (*direction)[edge]) {
  59.222 -        graph->findUEdge(source, target, edge);
  59.223 +        graph->findUEdge(u, v, edge);
  59.224        }
  59.225        return edge;
  59.226      }
  59.227 @@ -965,9 +965,9 @@
  59.228        return Node(graph->addNode()); 
  59.229      }
  59.230  
  59.231 -    Edge addEdge(const Node& source, const Node& target) const {
  59.232 -      Edge edge = graph->addEdge(source, target);
  59.233 -      direction->set(edge, graph->source(edge) == source);
  59.234 +    Edge addEdge(const Node& u, const Node& v) const {
  59.235 +      Edge edge = graph->addEdge(u, v);
  59.236 +      direction->set(edge, graph->source(edge) == u);
  59.237        return edge; 
  59.238      }
  59.239  
    60.1 --- a/lemon/unionfind.h	Fri Mar 02 17:56:22 2007 +0000
    60.2 +++ b/lemon/unionfind.h	Fri Mar 02 18:04:28 2007 +0000
    60.3 @@ -408,10 +408,10 @@
    60.4              items[items[k].nextClass].prevClass = nk;
    60.5            }
    60.6        
    60.7 -          int idx = items[k].nextItem;
    60.8 -          while (idx != k) {
    60.9 -            items[idx].parent = nk;
   60.10 -            idx = items[idx].nextItem;
   60.11 +          int l = items[k].nextItem;
   60.12 +          while (l != k) {
   60.13 +            items[l].parent = nk;
   60.14 +            l = items[l].nextItem;
   60.15            }
   60.16            
   60.17            items[nk].parent = items[k].parent + 1;
    61.1 --- a/test/all_pairs_shortest_path_test.cc	Fri Mar 02 17:56:22 2007 +0000
    61.2 +++ b/test/all_pairs_shortest_path_test.cc	Fri Mar 02 18:04:28 2007 +0000
    61.3 @@ -48,7 +48,7 @@
    61.4    typedef Graph::NodeMap<int> DistMap;
    61.5  
    61.6    const int n = argc > 1 ? atoi(argv[1]) : 20;
    61.7 -  const int e = argc > 2 ? atoi(argv[2]) : (int)(n * log((double)n));
    61.8 +  const int e = argc > 2 ? atoi(argv[2]) : int(n * log(double(n)));
    61.9    const int m = argc > 3 ? atoi(argv[3]) : 100;
   61.10  
   61.11    Graph graph;
    62.1 --- a/test/arborescence_test.cc	Fri Mar 02 17:56:22 2007 +0000
    62.2 +++ b/test/arborescence_test.cc	Fri Mar 02 18:04:28 2007 +0000
    62.3 @@ -19,24 +19,24 @@
    62.4  using namespace lemon;
    62.5  using namespace std;
    62.6  
    62.7 -const int n = 10;
    62.8 -const int e = 22;
    62.9 +const int NODES = 10;
   62.10 +const int EDGES = 22;
   62.11  
   62.12  int sourceNode = 0;
   62.13  
   62.14 -int sources[e] = {
   62.15 +int sources[EDGES] = {
   62.16    1, 0, 2, 4, 4, 3, 9, 8, 9, 8,
   62.17    4, 2, 0, 6, 4, 1, 7, 2, 8, 6,
   62.18    1, 0
   62.19  };
   62.20  
   62.21 -int targets[e] = {
   62.22 +int targets[EDGES] = {
   62.23    8, 3, 1, 1, 4, 9, 8, 1, 8, 0,
   62.24    3, 2, 1, 3, 1, 1, 2, 6, 3, 9,
   62.25    1, 3
   62.26  };
   62.27  
   62.28 -double costs[e] = {
   62.29 +double costs[EDGES] = {
   62.30    107.444, 70.3069, 46.0496, 28.3962, 91.4325,
   62.31    76.9443, 61.986, 39.3754, 74.9575, 39.3153,
   62.32    45.7094, 34.6184, 100.156, 95.726, 22.3429,
   62.33 @@ -56,11 +56,11 @@
   62.34    CostMap cost(graph);
   62.35    vector<Node> nodes;
   62.36    
   62.37 -  for (int i = 0; i < n; ++i) {
   62.38 +  for (int i = 0; i < NODES; ++i) {
   62.39      nodes.push_back(graph.addNode());
   62.40    }
   62.41  
   62.42 -  for (int i = 0; i < e; ++i) {
   62.43 +  for (int i = 0; i < EDGES; ++i) {
   62.44      Edge edge = graph.addEdge(nodes[sources[i]], nodes[targets[i]]);
   62.45      cost[edge] = costs[i];
   62.46    }
   62.47 @@ -85,7 +85,7 @@
   62.48    for (EdgeIt it(graph); it != INVALID; ++it) {
   62.49      if (mca.reached(graph.source(it))) {
   62.50        double sum = 0.0;
   62.51 -      for (int i = 0; i < (int)dualSolution.size(); ++i) {
   62.52 +      for (int i = 0; i < int(dualSolution.size()); ++i) {
   62.53          if (dualSolution[i].second.find(graph.target(it)) 
   62.54              != dualSolution[i].second.end() &&
   62.55              dualSolution[i].second.find(graph.source(it)) 
    63.1 --- a/test/bipartite_matching_test.cc	Fri Mar 02 17:56:22 2007 +0000
    63.2 +++ b/test/bipartite_matching_test.cc	Fri Mar 02 18:04:28 2007 +0000
    63.3 @@ -19,22 +19,22 @@
    63.4  typedef SmartBpUGraph Graph;
    63.5  BPUGRAPH_TYPEDEFS(Graph);
    63.6  
    63.7 -const int n = 10;
    63.8 -const int m = 10;
    63.9 -const int e = 52;
   63.10 -const int c = 100;
   63.11 +const int N = 10;
   63.12 +const int M = 10;
   63.13 +const int E = 52;
   63.14 +const int C = 100;
   63.15  
   63.16 -const int sa[e] = { 6, 5, 6, 4, 1, 0, 9, 5, 2, 4, 4, 3, 5,
   63.17 +const int sa[E] = { 6, 5, 6, 4, 1, 0, 9, 5, 2, 4, 4, 3, 5,
   63.18                      2, 3, 8, 3, 4, 9, 6, 9, 4, 3, 1, 5, 8,
   63.19                      4, 8, 9, 2, 2, 3, 0, 5, 2, 3, 6, 3, 8,
   63.20                      8, 4, 0, 9, 9, 6, 2, 1, 2, 7, 1, 9, 4};
   63.21  
   63.22 -const int ta[e] = { 2, 7, 4, 8, 6, 3, 4, 1, 7, 7, 0, 1, 6,
   63.23 +const int ta[E] = { 2, 7, 4, 8, 6, 3, 4, 1, 7, 7, 0, 1, 6,
   63.24                      3, 2, 6, 8, 3, 5, 6, 3, 1, 8, 7, 2, 0,
   63.25                      6, 9, 6, 7, 8, 3, 3, 4, 5, 8, 6, 4, 1,
   63.26                      4, 3, 3, 8, 7, 7, 3, 7, 7, 3, 5, 1, 6};
   63.27  
   63.28 -const int wa[e] = { 3, 99, 85, 16, 79, 52, 83, 99, 62, 6, 42, 6, 95,
   63.29 +const int wa[E] = { 3, 99, 85, 16, 79, 52, 83, 99, 62, 6, 42, 6, 95,
   63.30                      13, 34, 9, 5, 38, 39, 75, 99, 12, 73, 35, 93, 43,
   63.31                      54, 91, 45, 26, 77, 47, 11, 22, 50, 74, 37, 64, 91,
   63.32                      60, 6, 92, 29, 46, 34, 84, 67, 34, 45, 0, 39, 47};
   63.33 @@ -52,15 +52,15 @@
   63.34    int max_cardinality_max_weight;
   63.35    int min_cost_matching;
   63.36  
   63.37 -  for (int i = 0; i < n; ++i) {
   63.38 +  for (int i = 0; i < N; ++i) {
   63.39      Node node = graph.addANode();
   63.40      aNodes.push_back(node);
   63.41    }
   63.42 -  for (int i = 0; i < m; ++i) {
   63.43 +  for (int i = 0; i < M; ++i) {
   63.44      Node node = graph.addBNode();
   63.45      bNodes.push_back(node);
   63.46    }
   63.47 -  for (int i = 0; i < e; ++i) {
   63.48 +  for (int i = 0; i < E; ++i) {
   63.49      Node aNode = aNodes[sa[i]];
   63.50      Node bNode = bNodes[ta[i]];
   63.51      UEdge uedge = graph.addEdge(aNode, bNode);
   63.52 @@ -288,7 +288,7 @@
   63.53    }
   63.54  
   63.55    Graph::UEdgeMap<int> cost(graph);
   63.56 -  cost = subMap(constMap<UEdge>(c), weight);
   63.57 +  cost = subMap(constMap<UEdge>(C), weight);
   63.58    {
   63.59  
   63.60      MinCostMaxBipartiteMatching<Graph> bpmatch(graph, cost);
   63.61 @@ -303,7 +303,7 @@
   63.62      
   63.63      min_cost_matching = bpmatch.matchingCost();
   63.64      check(max_cardinality == bpmatch.matchingSize(), "WRONG SIZE");
   63.65 -    check(max_cardinality * c - max_cardinality_max_weight 
   63.66 +    check(max_cardinality * C - max_cardinality_max_weight 
   63.67            == bpmatch.matchingCost(), "WRONG SIZE");
   63.68  
   63.69      for (UEdgeIt it(graph); it != INVALID; ++it) {
   63.70 @@ -326,7 +326,7 @@
   63.71  
   63.72      min_cost_matching = bpmatch.matchingCost();
   63.73      check(max_cardinality == bpmatch.matchingSize(), "WRONG SIZE");
   63.74 -    check(max_cardinality * c - max_cardinality_max_weight 
   63.75 +    check(max_cardinality * C - max_cardinality_max_weight 
   63.76            == bpmatch.matchingCost(), "WRONG SIZE");
   63.77  
   63.78    }
    64.1 --- a/test/lp_test.cc	Fri Mar 02 17:56:22 2007 +0000
    64.2 +++ b/test/lp_test.cc	Fri Mar 02 18:04:28 2007 +0000
    64.3 @@ -261,9 +261,9 @@
    64.4    check(lp.primalStatus()==stat, buf.str());
    64.5  
    64.6    if (stat ==  LpSolverBase::OPTIMAL) {
    64.7 -    std::ostringstream buf;
    64.8 -    buf << "Wrong optimal value: the right optimum is " << exp_opt; 
    64.9 -    check(std::abs(lp.primalValue()-exp_opt) < 1e-3, buf.str());
   64.10 +    std::ostringstream sbuf;
   64.11 +    sbuf << "Wrong optimal value: the right optimum is " << exp_opt; 
   64.12 +    check(std::abs(lp.primalValue()-exp_opt) < 1e-3, sbuf.str());
   64.13      //+ecvt(exp_opt,2)
   64.14    }
   64.15  }
    65.1 --- a/test/map_test.h	Fri Mar 02 17:56:22 2007 +0000
    65.2 +++ b/test/map_test.h	Fri Mar 02 18:04:28 2007 +0000
    65.3 @@ -45,7 +45,7 @@
    65.4      }
    65.5      typedef typename Graph::template NodeMap<int> IntNodeMap;
    65.6      IntNodeMap map(graph, 42);
    65.7 -    for (int i = 0; i < (int)nodes.size(); ++i) {
    65.8 +    for (int i = 0; i < int(nodes.size()); ++i) {
    65.9        check(map[nodes[i]] == 42, "Wrong map constructor.");      
   65.10      }
   65.11      for (int i = 0; i < num; ++i) {
   65.12 @@ -53,7 +53,7 @@
   65.13        map[nodes.back()] = 23;
   65.14      }
   65.15      map = constMap<Node>(12);
   65.16 -    for (int i = 0; i < (int)nodes.size(); ++i) {
   65.17 +    for (int i = 0; i < int(nodes.size()); ++i) {
   65.18        check(map[nodes[i]] == 12, "Wrong map constructor.");      
   65.19      }    
   65.20      graph.clear();
   65.21 @@ -83,7 +83,7 @@
   65.22      typedef typename Graph::template EdgeMap<int> IntEdgeMap;
   65.23      IntEdgeMap map(graph, 42);
   65.24      
   65.25 -    for (int i = 0; i < (int)edges.size(); ++i) {
   65.26 +    for (int i = 0; i < int(edges.size()); ++i) {
   65.27        check(map[edges[i]] == 42, "Wrong map constructor.");      
   65.28      }
   65.29      
   65.30 @@ -94,7 +94,7 @@
   65.31        }
   65.32      }
   65.33      map = constMap<Edge>(12);
   65.34 -    for (int i = 0; i < (int)edges.size(); ++i) {
   65.35 +    for (int i = 0; i < int(edges.size()); ++i) {
   65.36        check(map[edges[i]] == 12, "Wrong map constructor.");      
   65.37      }    
   65.38      graph.clear();
    66.1 --- a/test/max_matching_test.cc	Fri Mar 02 17:56:22 2007 +0000
    66.2 +++ b/test/max_matching_test.cc	Fri Mar 02 18:04:28 2007 +0000
    66.3 @@ -74,7 +74,7 @@
    66.4    for(NodeIt v(g); v!=INVALID; ++v) {
    66.5      if ( mate[v]!=INVALID ) ++s;
    66.6    }
    66.7 -  int size=(int)s/2;  //size will be used as the size of a maxmatching
    66.8 +  int size=int(s/2);  //size will be used as the size of a maxmatching
    66.9  
   66.10    for(NodeIt v(g); v!=INVALID; ++v) {
   66.11      max_matching.mate(v);
   66.12 @@ -92,7 +92,7 @@
   66.13    for(NodeIt v(g); v!=INVALID; ++v) {
   66.14      if ( mate[v]!=INVALID ) ++s;
   66.15    }
   66.16 -  check ( (int)s/2 == size, "The size does not equal!" );
   66.17 +  check ( int(s/2) == size, "The size does not equal!" );
   66.18  
   66.19    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos1(g);
   66.20    max_matching.writePos(pos1);
   66.21 @@ -103,7 +103,7 @@
   66.22    for(NodeIt v(g); v!=INVALID; ++v) {
   66.23      if ( mate[v]!=INVALID ) ++s;
   66.24    }
   66.25 -  check ( (int)s/2 == size, "The size does not equal!" ); 
   66.26 +  check ( int(s/2) == size, "The size does not equal!" ); 
   66.27    
   66.28    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos2(g);
   66.29    max_matching.writePos(pos2);
   66.30 @@ -115,7 +115,7 @@
   66.31    for(NodeIt v(g); v!=INVALID; ++v) {
   66.32      if ( mate[v]!=INVALID ) ++s;
   66.33    }
   66.34 -  check ( (int)s/2 == size, "The size does not equal!" ); 
   66.35 +  check ( int(s/2) == size, "The size does not equal!" ); 
   66.36    
   66.37    Graph::NodeMap<MaxMatching<Graph>::pos_enum> pos(g);
   66.38    max_matching.writePos(pos);
   66.39 @@ -176,7 +176,7 @@
   66.40    for(NodeIt v(g); v!=INVALID; ++v) {
   66.41      if ( pos[v]==max_matching.A ) ++barrier;
   66.42    }
   66.43 -  int expected_size=(int)( countNodes(g)-num_comp+barrier)/2;
   66.44 +  int expected_size=int( countNodes(g)-num_comp+barrier)/2;
   66.45    check ( size==expected_size, "The size of the matching is wrong." );
   66.46    
   66.47    return 0;
    67.1 --- a/test/mip_test.cc	Fri Mar 02 17:56:22 2007 +0000
    67.2 +++ b/test/mip_test.cc	Fri Mar 02 18:04:28 2007 +0000
    67.3 @@ -30,9 +30,9 @@
    67.4    check(lp.mipStatus()==stat, buf.str());
    67.5  
    67.6    if (stat ==  MipSolverBase::OPTIMAL) {
    67.7 -    std::ostringstream buf;
    67.8 +    std::ostringstream sbuf;
    67.9      buf << "Wrong optimal value: the right optimum is " << exp_opt; 
   67.10 -    check(std::abs(lp.primalValue()-exp_opt) < 1e-3, buf.str());
   67.11 +    check(std::abs(lp.primalValue()-exp_opt) < 1e-3, sbuf.str());
   67.12      //+ecvt(exp_opt,2)
   67.13    }
   67.14  }
    68.1 --- a/test/radix_sort_test.cc	Fri Mar 02 17:56:22 2007 +0000
    68.2 +++ b/test/radix_sort_test.cc	Fri Mar 02 18:04:28 2007 +0000
    68.3 @@ -32,6 +32,8 @@
    68.4  using namespace std;
    68.5  using namespace lemon;
    68.6  
    68.7 +typedef unsigned char uchar;
    68.8 +
    68.9  void checkRadixSort() {
   68.10    {
   68.11      int n = 10000;
   68.12 @@ -48,7 +50,7 @@
   68.13      int n = 10000;
   68.14      vector<unsigned char> data1(n), data2(n);
   68.15      for (int i = 0; i < n; ++i) {
   68.16 -      data1[i] = data2[i] = rnd[(unsigned char)200];
   68.17 +      data1[i] = data2[i] = rnd[uchar(200)];
   68.18      }
   68.19      radixSort(data1.begin(), data1.end());
   68.20      sort(data2.begin(), data2.end());
   68.21 @@ -75,7 +77,7 @@
   68.22      int n = 10000;
   68.23      vector<unsigned char> data1(n), data2(n);
   68.24      for (int i = 0; i < n; ++i) {
   68.25 -      data1[i] = data2[i] = rnd[(unsigned char)200];
   68.26 +      data1[i] = data2[i] = rnd[uchar(200)];
   68.27      }
   68.28      counterSort(data1.begin(), data1.end());
   68.29      sort(data2.begin(), data2.end());
   68.30 @@ -96,7 +98,7 @@
   68.31    typedef Graph::Edge Edge;
   68.32  
   68.33    const int n = 100;
   68.34 -  const int e = (int)(n * log((double)n));
   68.35 +  const int e = int(n * log(double(n)));
   68.36  
   68.37    Graph graph;
   68.38    vector<Node> nodes;
   68.39 @@ -117,12 +119,12 @@
   68.40  
   68.41    Graph::EdgeMap<bool> was(graph, false);
   68.42  
   68.43 -  for (int i = 0; i < (int)edges.size(); ++i) {
   68.44 +  for (int i = 0; i < int(edges.size()); ++i) {
   68.45      check(!was[edges[i]], "Test failed");
   68.46      was[edges[i]] = true;
   68.47    }
   68.48  
   68.49 -  for (int i = 1; i < (int)edges.size(); ++i) {
   68.50 +  for (int i = 1; i < int(edges.size()); ++i) {
   68.51      check(graph.id(graph.source(edges[i - 1])) <= 
   68.52  	  graph.id(graph.source(edges[i])), "Test failed");
   68.53    }
   68.54 @@ -135,7 +137,7 @@
   68.55    typedef Graph::Edge Edge;
   68.56  
   68.57    const int n = 100;
   68.58 -  const int e = (int)(n * log((double)n));
   68.59 +  const int e = int(n * log(double(n)));
   68.60  
   68.61    Graph graph;
   68.62    vector<Node> nodes;
   68.63 @@ -160,12 +162,12 @@
   68.64  
   68.65    Graph::EdgeMap<bool> was(graph, false);
   68.66  
   68.67 -  for (int i = 0; i < (int)edges.size(); ++i) {
   68.68 +  for (int i = 0; i < int(edges.size()); ++i) {
   68.69      check(!was[edges[i]], "Test failed");
   68.70      was[edges[i]] = true;
   68.71    }
   68.72  
   68.73 -  for (int i = 1; i < (int)edges.size(); ++i) {
   68.74 +  for (int i = 1; i < int(edges.size()); ++i) {
   68.75      check(graph.id(graph.target(edges[i - 1])) < 
   68.76  	  graph.id(graph.target(edges[i])) || 
   68.77  	  (graph.id(graph.target(edges[i - 1])) ==