hugo -> lemon renaming leftovers
authorklao
Wed, 29 Sep 2004 16:31:24 +0000
changeset 922e816fac59f6d
parent 921 818510fa3d99
child 923 acbef5dd0e65
hugo -> lemon renaming leftovers
AUTHORS
COPYING
LICENSE
doc/Doxyfile
src/demo/sub_graph_wrapper_demo.dim
src/lemon/tight_edge_filter_map.h
src/work/Doxyfile
src/work/athos/preflow_push.hh
src/work/deba/main.cpp
src/work/peter/Makefile
     1.1 --- a/AUTHORS	Wed Sep 29 15:30:04 2004 +0000
     1.2 +++ b/AUTHORS	Wed Sep 29 16:31:24 2004 +0000
     1.3 @@ -1,4 +1,4 @@
     1.4 -HUGOlib was started as an inter-university project from two
     1.5 +LEMON was started as an inter-university project from two
     1.6  universities: BME (Budapest University of Technology and Economics,
     1.7  Hungary) and ELTE (Eotvos Lorand University, Budapest, Hungary) and
     1.8  supported by ETIK (Inter-University Centre for Telecommunications and
     1.9 @@ -16,7 +16,7 @@
    1.10  For every contributor we list the supporters who supported his or her
    1.11  work.
    1.12  
    1.13 -So here is (the hopefully complete) list of contributors of the HUGOlib
    1.14 +So here is (the hopefully complete) list of contributors of the LEMON
    1.15  (in alphabetical order). The fields are: name (N), email (E), web-address
    1.16  (W), PGP key ID and fingerprint (P), description (D), snail-mail
    1.17  address (A), Subversion commit name (C), and the list of supporters (S)
     2.1 --- a/COPYING	Wed Sep 29 15:30:04 2004 +0000
     2.2 +++ b/COPYING	Wed Sep 29 16:31:24 2004 +0000
     2.3 @@ -1,8 +1,8 @@
     2.4 -HUGOlib as a whole is copyrighted by Egerváry Jenő Kombinatorikus
     2.5 +LEMON as a whole is copyrighted by Egerváry Jenő Kombinatorikus
     2.6  Optimalizálási Kutatócsoport (Egervary Combinatorial Optimization
     2.7  Research Group, EGRES).
     2.8  
     2.9 -You are free to use, modify and distribute HUGOlib under the terms
    2.10 +You are free to use, modify and distribute LEMON under the terms
    2.11  described in the LICENSE file.
    2.12  
    2.13  This project is supported by
     3.1 --- a/LICENSE	Wed Sep 29 15:30:04 2004 +0000
     3.2 +++ b/LICENSE	Wed Sep 29 16:31:24 2004 +0000
     3.3 @@ -1,4 +1,4 @@
     3.4 -HUGOlib code without an explicit copyright is covered by the following
     3.5 +LEMON code without an explicit copyright is covered by the following
     3.6  copyright/license:
     3.7  
     3.8  Copyright (C) 2003-2004 Egervary Jeno Kombinatorikus Optimalizalasi
     4.1 --- a/doc/Doxyfile	Wed Sep 29 15:30:04 2004 +0000
     4.2 +++ b/doc/Doxyfile	Wed Sep 29 16:31:24 2004 +0000
     4.3 @@ -17,7 +17,7 @@
     4.4  # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
     4.5  # by quotes) that should identify the project.
     4.6  
     4.7 -PROJECT_NAME           = HugoLib
     4.8 +PROJECT_NAME           = LEMON
     4.9  
    4.10  # The PROJECT_NUMBER tag can be used to enter a project or revision number. 
    4.11  # This could be handy for archiving the generated documentation or 
    4.12 @@ -397,8 +397,8 @@
    4.13                           coding_style.dox \
    4.14                           groups.dox \
    4.15                           namespaces.dox \
    4.16 -                         ../src/hugo \
    4.17 -                         ../src/hugo/skeletons \
    4.18 +                         ../src/lemon \
    4.19 +                         ../src/lemon/skeletons \
    4.20                           ../src/test/test_tools.h
    4.21  
    4.22  # If the value of the INPUT tag contains directories, you can use the 
     5.1 --- a/src/demo/sub_graph_wrapper_demo.dim	Wed Sep 29 15:30:04 2004 +0000
     5.2 +++ b/src/demo/sub_graph_wrapper_demo.dim	Wed Sep 29 16:31:24 2004 +0000
     5.3 @@ -1,4 +1,4 @@
     5.4 -c HUGO max flow problem
     5.5 +c LEMON max flow problem
     5.6  p max 7 9
     5.7  n 1 s
     5.8  n 7 t
     6.1 --- a/src/lemon/tight_edge_filter_map.h	Wed Sep 29 15:30:04 2004 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,63 +0,0 @@
     6.4 -/* -*- C++ -*-
     6.5 - * src/hugo/tight_edge_filter_map.h - Part of HUGOlib, a generic C++ optimization library
     6.6 - *
     6.7 - * Copyright (C) 2004 Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
     6.8 - * (Egervary Combinatorial Optimization Research Group, EGRES).
     6.9 - *
    6.10 - * Permission to use, modify and distribute this software is granted
    6.11 - * provided that this copyright notice appears in all copies. For
    6.12 - * precise terms see the accompanying LICENSE file.
    6.13 - *
    6.14 - * This software is provided "AS IS" with no warranty of any kind,
    6.15 - * express or implied, and with no claim as to its suitability for any
    6.16 - * purpose.
    6.17 - *
    6.18 - */
    6.19 -
    6.20 -#ifndef HUGO_TIGHT_EDGE_FILTER_MAP_H
    6.21 -#define HUGO_TIGHT_EDGE_FILTER_MAP_H
    6.22 -
    6.23 -#include <hugo/maps.h>
    6.24 -
    6.25 -// /// \file
    6.26 -// /// \brief Maximum flow algorithms.
    6.27 -// /// \ingroup galgs
    6.28 -
    6.29 -namespace hugo {
    6.30 -
    6.31 -  /// \brief A map for filtering the edge-set to those edges 
    6.32 -  /// which are tight w.r.t. some node_potential map and 
    6.33 -  /// edge_distance map.
    6.34 -  ///
    6.35 -  /// A node-map node_potential is said to be a potential w.r.t. 
    6.36 -  /// an edge-map edge_distance 
    6.37 -  /// if and only if for each edge e, node_potential[g.head(e)] 
    6.38 -  /// <= edge_distance[e]+node_potential[g.tail(e)] 
    6.39 -  /// (or the reverse inequality holds for each edge).
    6.40 -  /// An edge is said to be tight if this inequality holds with equality, 
    6.41 -  /// and the map returns true exactly for those edges.
    6.42 -  /// To avoid rounding errors, it is recommended to use this class with exact 
    6.43 -  /// types, e.g. with int.
    6.44 -  template<typename Graph, 
    6.45 -	   typename NodePotentialMap, typename EdgeDistanceMap>
    6.46 -  class TightEdgeFilterMap : public MapBase<typename Graph::Edge, bool> {
    6.47 -  protected:
    6.48 -    const Graph* g;
    6.49 -    NodePotentialMap* node_potential;
    6.50 -    EdgeDistanceMap* edge_distance;
    6.51 -  public:
    6.52 -    TightEdgeFilterMap(Graph& _g, NodePotentialMap& _node_potential, 
    6.53 -		       EdgeDistanceMap& _edge_distance) : 
    6.54 -      g(&_g), node_potential(&_node_potential), 
    6.55 -      edge_distance(&_edge_distance) { }
    6.56 -    bool operator[](const typename Graph::Edge& e) const {
    6.57 -      return ((*node_potential)[g->head(e)] == 
    6.58 -	      (*edge_distance)[e]+(*node_potential)[g->tail(e)]);
    6.59 -    }
    6.60 -  };
    6.61 -
    6.62 -} //namespace hugo
    6.63 -
    6.64 -#endif //HUGO_TIGHT_EDGE_FILTER_MAP_H
    6.65 -
    6.66 -
     7.1 --- a/src/work/Doxyfile	Wed Sep 29 15:30:04 2004 +0000
     7.2 +++ b/src/work/Doxyfile	Wed Sep 29 16:31:24 2004 +0000
     7.3 @@ -17,13 +17,13 @@
     7.4  # The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
     7.5  # by quotes) that should identify the project.
     7.6  
     7.7 -PROJECT_NAME           = HugoLib
     7.8 +PROJECT_NAME           = LEMON
     7.9  
    7.10  # The PROJECT_NUMBER tag can be used to enter a project or revision number. 
    7.11  # This could be handy for archiving the generated documentation or 
    7.12  # if some version control system is used.
    7.13  
    7.14 -PROJECT_NUMBER         = 0.1
    7.15 +PROJECT_NUMBER         = 0.2
    7.16  
    7.17  # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
    7.18  # base path where the generated documentation will be put. 
    7.19 @@ -395,8 +395,8 @@
    7.20  			 ../../doc/graphs.dox \
    7.21                           ../../doc/maps.dox ../../doc/coding_style.dox \
    7.22                           ../../doc/groups.dox \
    7.23 -                         ../hugo \
    7.24 -                         ../hugo/skeletons \
    7.25 +                         ../lemon \
    7.26 +                         ../lemon/skeletons \
    7.27                           ../test/test_tools.h \
    7.28                           klao/path.h \
    7.29                           klao/debug.h \
     8.1 --- a/src/work/athos/preflow_push.hh	Wed Sep 29 15:30:04 2004 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,486 +0,0 @@
     8.4 -#ifndef HUGO_PREFLOW_PUSH_HH
     8.5 -#define HUGO_PREFLOW_PUSH_HH
     8.6 -
     8.7 -//#include <algorithm>
     8.8 -#include <list>
     8.9 -#include <vector>
    8.10 -#include <queue>
    8.11 -//#include "pf_hiba.hh"
    8.12 -//#include <marci_list_graph.hh>
    8.13 -//#include <marci_graph_traits.hh>
    8.14 -#include <invalid.h>
    8.15 -#include <graph_wrapper.h>
    8.16 -//#include <reverse_bfs.hh>
    8.17 -
    8.18 -using namespace std;
    8.19 -
    8.20 -namespace hugo {
    8.21 -
    8.22 -  template <typename Graph, typename T>
    8.23 -  class preflow_push {
    8.24 -
    8.25 -    //Useful typedefs
    8.26 -    typedef typename Graph::Node Node;
    8.27 -    typedef typename Graph::NodeIt NodeIt;
    8.28 -    typedef typename Graph::Edge Edge;
    8.29 -    typedef typename Graph::OutEdgeIt OutEdgeIt;
    8.30 -    typedef typename Graph::InEdgeIt InEdgeIt;
    8.31 -    typedef typename Graph::EdgeMap<T> CapacityType;
    8.32 -
    8.33 -    typedef ResGraphWrapper<const Graph,int,CapacityType,CapacityType> ResGraphType;
    8.34 -
    8.35 -
    8.36 -    //---------------------------------------------
    8.37 -    //Parameters of the algorithm
    8.38 -    //---------------------------------------------
    8.39 -    //Fully examine an active node until excess becomes 0
    8.40 -    enum node_examination_t {examine_full, examine_to_relabel};
    8.41 -    //No more implemented yet:, examine_only_one_edge};
    8.42 -    node_examination_t node_examination;
    8.43 -    //Which implementation to be used
    8.44 -    enum implementation_t {impl_fifo, impl_highest_label};
    8.45 -    //No more implemented yet:};
    8.46 -    implementation_t implementation;
    8.47 -    //---------------------------------------------
    8.48 -    //Parameters of the algorithm
    8.49 -    //---------------------------------------------
    8.50 - 
    8.51 -  private:
    8.52 -    //input
    8.53 -    Graph& G;
    8.54 -    Node s;
    8.55 -    Node t;
    8.56 -    CapacityType &capacity;
    8.57 -
    8.58 -    //output
    8.59 -    CapacityType preflow;
    8.60 -    T maxflow_value;
    8.61 -  
    8.62 -    //auxiliary variables for computation
    8.63 -    //The number of the nodes
    8.64 -    int number_of_nodes;
    8.65 -    //A nodemap for the level
    8.66 -    typename Graph::NodeMap<int> level;
    8.67 -    //A nodemap for the excess
    8.68 -    typename Graph::NodeMap<T> excess;
    8.69 -    
    8.70 -    //Number of nodes on each level
    8.71 -    vector<int> num_of_nodes_on_level;
    8.72 -    
    8.73 -    //For the FIFO implementation
    8.74 -    list<Node> fifo_nodes;
    8.75 -    //For 'highest label' implementation
    8.76 -    int highest_active;
    8.77 -    //int second_highest_active;
    8.78 -    vector< list<Node> > active_nodes;
    8.79 -
    8.80 -  public:
    8.81 -  
    8.82 -    //Constructing the object using the graph, source, sink and capacity vector
    8.83 -    preflow_push(
    8.84 -		      Graph& _G, 
    8.85 -		      Node _s, 
    8.86 -		      Node _t, 
    8.87 -		      typename Graph::EdgeMap<T> & _capacity)
    8.88 -      : G(_G), s(_s), t(_t), 
    8.89 -	capacity(_capacity), 
    8.90 -	preflow(_G),
    8.91 -	//Counting the number of nodes
    8.92 -	//number_of_nodes(count(G.first<EachNodeIt>())),
    8.93 -	number_of_nodes(G.nodeNum()),
    8.94 -
    8.95 -	level(_G),
    8.96 -	excess(_G)//,
    8.97 -        // Default constructor: active_nodes()
    8.98 -    { 
    8.99 -      //Simplest parameter settings
   8.100 -      node_examination = examine_full;//examine_to_relabel;//
   8.101 -      //Which implementation to be usedexamine_full
   8.102 -      implementation = impl_highest_label;//impl_fifo;
   8.103 - 
   8.104 -      //
   8.105 -      num_of_nodes_on_level.resize(2*number_of_nodes-1);
   8.106 -      num_of_nodes_on_level.clear();
   8.107 -
   8.108 -      switch(implementation){
   8.109 -      case impl_highest_label :{
   8.110 -	active_nodes.clear();
   8.111 -	active_nodes.resize(2*number_of_nodes-1);
   8.112 -	
   8.113 -	break;
   8.114 -      }
   8.115 -      default:
   8.116 -	break;
   8.117 -      }
   8.118 -
   8.119 -    }
   8.120 -
   8.121 -    //Returns the value of a maximal flow 
   8.122 -    T run();
   8.123 -  
   8.124 -    typename Graph::EdgeMap<T>  getmaxflow(){
   8.125 -      return preflow;
   8.126 -    }
   8.127 -
   8.128 -
   8.129 -  private:
   8.130 -    //For testing purposes only
   8.131 -    //Lists the node_properties
   8.132 -    void write_property_vector(typename Graph::NodeMap<T> a,
   8.133 -			       //node_property_vector<Graph, T> a, 
   8.134 -			       char* prop_name="property"){
   8.135 -      for(NodeIt i=G.template first<NodeIt>(); G.valid(i); G.next(i)) {
   8.136 -	cout<<"Node id.: "<<G.id(i)<<", "<<prop_name<<" value: "<<a[i]<<endl;
   8.137 -      }
   8.138 -      cout<<endl;
   8.139 -    }
   8.140 -    /*
   8.141 -    //Modifies the excess of the node and makes sufficient changes
   8.142 -    void modify_excess(const Node& a ,T v){
   8.143 -      //T old_value=excess[a];
   8.144 -      excess[a] += v;
   8.145 -    }
   8.146 -  
   8.147 -    //This private procedure is supposed to modify the preflow on edge j
   8.148 -    //by value v (which can be positive or negative as well) 
   8.149 -    //and maintain the excess on the head and tail
   8.150 -    //Here we do not check whether this is possible or not
   8.151 -    void modify_preflow(Edge j, const T& v){
   8.152 -
   8.153 -      //Modifiyng the edge
   8.154 -      preflow[j] += v;
   8.155 -
   8.156 -
   8.157 -      //Modifiyng the head
   8.158 -      modify_excess(G.head(j),v);
   8.159 -	
   8.160 -      //Modifiyng the tail
   8.161 -      modify_excess(G.tail(j),-v);
   8.162 -
   8.163 -    }
   8.164 -    */
   8.165 -    //Gives the active node to work with 
   8.166 -    //(depending on the implementation to be used)
   8.167 -    Node get_active_node(){
   8.168 -      
   8.169 -
   8.170 -      switch(implementation) {
   8.171 -      case impl_highest_label : {
   8.172 -
   8.173 -	//First need to find the highest label for which there's an active node
   8.174 -	while( highest_active>=0 && active_nodes[highest_active].empty() ){ 
   8.175 -	  --highest_active;
   8.176 -	}
   8.177 -
   8.178 -	if( highest_active>=0) {
   8.179 -	  
   8.180 -
   8.181 -	  Node a=active_nodes[highest_active].front();
   8.182 -	  active_nodes[highest_active].pop_front();
   8.183 -	  
   8.184 -	  return a;
   8.185 -	}
   8.186 -	else {
   8.187 -	  return INVALID;
   8.188 -	}
   8.189 -	
   8.190 -	break;
   8.191 -	
   8.192 -      }
   8.193 -      case impl_fifo : {
   8.194 -
   8.195 -	if( ! fifo_nodes.empty() ) {
   8.196 -	  Node a=fifo_nodes.front();
   8.197 -	  fifo_nodes.pop_front();
   8.198 -	  return a;
   8.199 -	}
   8.200 -	else {
   8.201 -	  return INVALID;
   8.202 -	}
   8.203 -	break;
   8.204 -      }
   8.205 -      }
   8.206 -      //
   8.207 -      return INVALID;
   8.208 -    }
   8.209 -
   8.210 -    //Puts node 'a' among the active nodes
   8.211 -    void make_active(const Node& a){
   8.212 -      //s and t never become active
   8.213 -      if (a!=s && a!= t){
   8.214 -	switch(implementation){
   8.215 -	case impl_highest_label :
   8.216 -	  active_nodes[level[a]].push_back(a);
   8.217 -	  break;
   8.218 -	case impl_fifo :
   8.219 -	  fifo_nodes.push_back(a);
   8.220 -	  break;
   8.221 -	}
   8.222 -
   8.223 -      }
   8.224 -
   8.225 -      //Update highest_active label
   8.226 -      if (highest_active<level[a]){
   8.227 -	highest_active=level[a];
   8.228 -      }
   8.229 -
   8.230 -    }
   8.231 -
   8.232 -    //Changes the level of node a and make sufficent changes
   8.233 -    void change_level_to(Node a, int new_value){
   8.234 -      int seged = level[a];
   8.235 -      level.set(a,new_value);
   8.236 -      --num_of_nodes_on_level[seged];
   8.237 -      ++num_of_nodes_on_level[new_value];
   8.238 -    }
   8.239 -
   8.240 -    //Collection of things useful (or necessary) to do before running
   8.241 -
   8.242 -    void preprocess(){
   8.243 -
   8.244 -      //---------------------------------------
   8.245 -      //Initialize parameters
   8.246 -      //---------------------------------------
   8.247 -
   8.248 -      //Setting starting preflow, level and excess values to zero
   8.249 -      //This can be important, if the algorithm is run more then once
   8.250 -      for(NodeIt i=G.template first<NodeIt>(); G.valid(i); G.next(i)) {
   8.251 -        level.set(i,0);
   8.252 -        excess.set(i,0);
   8.253 -	for(OutEdgeIt j=G.template first<OutEdgeIt>(i); G.valid(j); G.next(j)) 
   8.254 -	  preflow.set(j, 0);
   8.255 -      }
   8.256 -      num_of_nodes_on_level[0]=number_of_nodes;
   8.257 -      highest_active=0;
   8.258 -      //---------------------------------------
   8.259 -      //Initialize parameters
   8.260 -      //---------------------------------------
   8.261 -
   8.262 -      
   8.263 -      //------------------------------------
   8.264 -      //This is the only part that uses BFS
   8.265 -      //------------------------------------
   8.266 -
   8.267 -      /*Reverse_bfs from t, to find the starting level.*/
   8.268 -      //Copyright: Jacint
   8.269 -      change_level_to(t,0);
   8.270 -
   8.271 -      std::queue<Node> bfs_queue;
   8.272 -      bfs_queue.push(t);
   8.273 -
   8.274 -      while (!bfs_queue.empty()) {
   8.275 -
   8.276 -	Node v=bfs_queue.front();	
   8.277 -	bfs_queue.pop();
   8.278 -	int l=level[v]+1;
   8.279 -
   8.280 -	InEdgeIt e;
   8.281 -	for(G.first(e,v); G.valid(e); G.next(e)) {
   8.282 -	  Node w=G.tail(e);
   8.283 -	  if ( level[w] == number_of_nodes && w != s ) {
   8.284 -	    bfs_queue.push(w);
   8.285 -	    //Node first=level_list[l];
   8.286 -	    //if ( G.valid(first) ) left.set(first,w);
   8.287 -	    //right.set(w,first);
   8.288 -	    //level_list[l]=w;
   8.289 -	    change_level_to(w, l);
   8.290 -	    //level.set(w, l);
   8.291 -	  }
   8.292 -	}
   8.293 -      }
   8.294 -      change_level_to(s,number_of_nodes);
   8.295 -      //level.set(s,number_of_nodes);
   8.296 -
   8.297 -      /*
   8.298 -      //Setting starting level values using reverse bfs
   8.299 -      reverse_bfs<Graph> rev_bfs(G,t);
   8.300 -      rev_bfs.run();
   8.301 -      //write_property_vector(rev_bfs.dist,"rev_bfs");
   8.302 -      for(NodeIt i=G.template first<NodeIt>(); G.valid(i); G.next(i)) {
   8.303 -        change_level_to(i,rev_bfs.dist(i));
   8.304 -	//level.put(i,rev_bfs.dist.get(i));
   8.305 -      }
   8.306 -      */
   8.307 -      //------------------------------------
   8.308 -      //This is the only part that uses BFS
   8.309 -      //------------------------------------
   8.310 -      
   8.311 -      
   8.312 -      //Starting level of s
   8.313 -      change_level_to(s,number_of_nodes);
   8.314 -      //level.put(s,number_of_nodes);
   8.315 -      
   8.316 -      
   8.317 -      //we push as much preflow from s as possible to start with
   8.318 -      for(OutEdgeIt j=G.template first<OutEdgeIt>(s); G.valid(j); G.next(j)){ 
   8.319 -	modify_preflow(j,capacity[j] );
   8.320 -	make_active(G.head(j));
   8.321 -	int lev=level[G.head(j)];
   8.322 -	if(highest_active<lev){
   8.323 -	  highest_active=lev;
   8.324 -	}
   8.325 -      }
   8.326 -      //cout<<highest_active<<endl;
   8.327 -    } 
   8.328 -
   8.329 -    
   8.330 -    //If the preflow is less than the capacity on the given edge
   8.331 -    //then it is an edge in the residual graph
   8.332 -    bool is_admissible_forward_edge(Edge j, int& new_level){
   8.333 -
   8.334 -      if (capacity[j]>preflow[j]){
   8.335 -	if(level[G.tail(j)]==level[G.head(j)]+1){
   8.336 -	  return true;
   8.337 -	}
   8.338 -	else{
   8.339 -	  if (level[G.head(j)] < new_level)
   8.340 -	    new_level=level[G.head(j)];
   8.341 -	}
   8.342 -      }
   8.343 -      return false;
   8.344 -    }
   8.345 -
   8.346 -    //If the preflow is greater than 0 on the given edge
   8.347 -    //then the edge reversd is an edge in the residual graph
   8.348 -    bool is_admissible_backward_edge(Edge j, int& new_level){
   8.349 -      
   8.350 -      if (0<preflow[j]){
   8.351 -	if(level[G.tail(j)]==level[G.head(j)]-1){
   8.352 -	 
   8.353 -	  return true;
   8.354 -	}
   8.355 -	else{
   8.356 -	  if (level[G.tail(j)] < new_level)
   8.357 -	    new_level=level[G.tail(j)];
   8.358 -	}
   8.359 -	
   8.360 -      }
   8.361 -      return false;
   8.362 -    }
   8.363 -
   8.364 - 
   8.365 -  };  //class preflow_push  
   8.366 -
   8.367 -  template<typename Graph, typename T>
   8.368 -    T preflow_push<Graph, T>::run() {
   8.369 -    
   8.370 -    //We need a residual graph
   8.371 -    ResGraphType res_graph(G, preflow, capacity);
   8.372 -    
   8.373 -    preprocess();
   8.374 -    //write_property_vector(level,"level");
   8.375 -    T e,v;
   8.376 -    Node a;
   8.377 -    while (a=get_active_node(), G.valid(a)){
   8.378 -      
   8.379 -      bool go_to_next_node=false;
   8.380 -      e = excess[a];
   8.381 -      while (!go_to_next_node){
   8.382 -
   8.383 -	//Initial value for the new level for the active node we are dealing with
   8.384 -	int new_level=2*number_of_nodes;
   8.385 -
   8.386 -
   8.387 -	//Out edges from node a
   8.388 -	{
   8.389 -	  ResGraphType::OutEdgeIt j=res_graph.first(j,a);
   8.390 -	  while (res_graph.valid(j) && e){
   8.391 -	    if (is_admissible_forward_edge(j,new_level)){
   8.392 -	      v=min(e,res_graph.resCap(j));
   8.393 -	      e -= v;
   8.394 -	      //New node might become active
   8.395 -	      if (excess[res_graph.head(j)]==0){
   8.396 -		make_active(res_graph.head(j));
   8.397 -	      }
   8.398 -	      res_graph.augment(j,v);
   8.399 -	      excess[res_graph.tail(j)] -= v;
   8.400 -	      excess[res_graph.head(j)] += v;
   8.401 -	    }
   8.402 -	    res_graph.next(j);
   8.403 -	  }
   8.404 -	}
   8.405 -
   8.406 -	/*
   8.407 -	//Out edges from node a
   8.408 -	{
   8.409 -	  OutEdgeIt j=G.template first<OutEdgeIt>(a);
   8.410 -	  while (G.valid(j) && e){
   8.411 -
   8.412 -	    if (is_admissible_forward_edge(j,new_level)){
   8.413 -	      v=min(e,capacity[j] - preflow[j]);
   8.414 -	      e -= v;
   8.415 -	      //New node might become active
   8.416 -	      if (excess[G.head(j)]==0){
   8.417 -		make_active(G.head(j));
   8.418 -	      }
   8.419 -	      modify_preflow(j,v);
   8.420 -	    }
   8.421 -	    G.next(j);
   8.422 -	  }
   8.423 -	}
   8.424 -	//In edges to node a
   8.425 -	{
   8.426 -	  InEdgeIt j=G.template first<InEdgeIt>(a);
   8.427 -	  while (G.valid(j) && e){
   8.428 -	    if (is_admissible_backward_edge(j,new_level)){
   8.429 -	      v=min(e,preflow[j]);
   8.430 -	      e -= v;
   8.431 -	      //New node might become active
   8.432 -	      if (excess[G.tail(j)]==0){
   8.433 -		make_active(G.tail(j));
   8.434 -	      }
   8.435 -	      modify_preflow(j,-v);
   8.436 -	    }
   8.437 -	    G.next(j);
   8.438 -	  }
   8.439 -	}
   8.440 -	*/
   8.441 -
   8.442 -	//if (G.id(a)==999)
   8.443 -	//cout<<new_level<<" e: "<<e<<endl;
   8.444 -	//cout<<G.id(a)<<" "<<new_level<<endl;
   8.445 -
   8.446 -	if (0==e){
   8.447 -	  //Saturating push
   8.448 -	  go_to_next_node=true;
   8.449 -	}
   8.450 -	else{//If there is still excess in node a
   8.451 -	  
   8.452 -	  //change_level_to(a,new_level+1);
   8.453 -	  
   8.454 -	  //Level remains empty
   8.455 -	  if (num_of_nodes_on_level[level[a]]==1){
   8.456 -	    change_level_to(a,number_of_nodes);
   8.457 -	    //go_to_next_node=True;
   8.458 -	  }
   8.459 -	  else{
   8.460 -	    change_level_to(a,new_level+1);
   8.461 -	    //increase_level(a);
   8.462 -	  }
   8.463 -	  
   8.464 -    
   8.465 -	  
   8.466 -
   8.467 -	  switch(node_examination){
   8.468 -	  case examine_to_relabel:
   8.469 -	    make_active(a);
   8.470 -
   8.471 -	    go_to_next_node = true;
   8.472 -	    break;
   8.473 -	  default:
   8.474 -	    break;
   8.475 -	  }
   8.476 -	  
   8.477 -    
   8.478 -	
   8.479 -	}//if (0==e)
   8.480 -      }
   8.481 -    }
   8.482 -    maxflow_value = excess[t];
   8.483 -    return maxflow_value;
   8.484 -  }//run
   8.485 -
   8.486 -
   8.487 -}//namespace hugo
   8.488 -
   8.489 -#endif //PREFLOW_PUSH_HH
     9.1 --- a/src/work/deba/main.cpp	Wed Sep 29 15:30:04 2004 +0000
     9.2 +++ b/src/work/deba/main.cpp	Wed Sep 29 16:31:24 2004 +0000
     9.3 @@ -4,7 +4,7 @@
     9.4  #include "list_graph.h"
     9.5  
     9.6  using namespace std;
     9.7 -using namespace hugo;
     9.8 +using namespace lemon;
     9.9  
    9.10  
    9.11  
    10.1 --- a/src/work/peter/Makefile	Wed Sep 29 15:30:04 2004 +0000
    10.2 +++ b/src/work/peter/Makefile	Wed Sep 29 16:31:24 2004 +0000
    10.3 @@ -1,6 +1,6 @@
    10.4  hier: hierarchygraph.h hierarchygraph_test.cc
    10.5 -	g++ -Wall -W -I../.. -I../klao -I../../hugo hierarchygraph_test.cc -o test
    10.6 +	g++ -Wall -W -I../.. -I../klao -I../../lemon hierarchygraph_test.cc -o test
    10.7  
    10.8  edge: edgepathgraph_test.cc edgepathgraph.h
    10.9 -	g++ -Wall -W -I../.. -I../klao -I../../hugo edgepathgraph_test.cc -o test
   10.10 +	g++ -Wall -W -I../.. -I../klao -I../../lemon edgepathgraph_test.cc -o test
   10.11