lemon/network_simplex.h
branch1.1
changeset 1081 f1398882a928
parent 976 5205145fabf6
     1.1 --- a/lemon/network_simplex.h	Fri Aug 05 09:33:42 2011 +0200
     1.2 +++ b/lemon/network_simplex.h	Mon Aug 08 12:36:16 2011 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4   *
     1.5   * This file is a part of LEMON, a generic C++ optimization library.
     1.6   *
     1.7 - * Copyright (C) 2003-2009
     1.8 + * Copyright (C) 2003-2011
     1.9   * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    1.10   * (Egervary Research Group on Combinatorial Optimization, EGRES).
    1.11   *
    1.12 @@ -95,7 +95,7 @@
    1.13        /// infinite upper bound.
    1.14        UNBOUNDED
    1.15      };
    1.16 -    
    1.17 +
    1.18      /// \brief Constants for selecting the type of the supply constraints.
    1.19      ///
    1.20      /// Enum type containing constants for selecting the supply type,
    1.21 @@ -113,7 +113,7 @@
    1.22        /// supply/demand constraints in the definition of the problem.
    1.23        LEQ
    1.24      };
    1.25 -    
    1.26 +
    1.27      /// \brief Constants for selecting the pivot rule.
    1.28      ///
    1.29      /// Enum type containing constants for selecting the pivot rule for
    1.30 @@ -156,7 +156,7 @@
    1.31        /// candidate list and extends this list in every iteration.
    1.32        ALTERING_LIST
    1.33      };
    1.34 -    
    1.35 +
    1.36    private:
    1.37  
    1.38      TEMPLATE_DIGRAPH_TYPEDEFS(GR);
    1.39 @@ -223,7 +223,7 @@
    1.40      Value delta;
    1.41  
    1.42    public:
    1.43 -  
    1.44 +
    1.45      /// \brief Constant for infinite upper bounds (capacities).
    1.46      ///
    1.47      /// Constant for infinite upper bounds (capacities).
    1.48 @@ -644,7 +644,7 @@
    1.49          "The flow type of NetworkSimplex must be signed");
    1.50        LEMON_ASSERT(std::numeric_limits<Cost>::is_signed,
    1.51          "The cost type of NetworkSimplex must be signed");
    1.52 -        
    1.53 +
    1.54        // Resize vectors
    1.55        _node_num = countNodes(_graph);
    1.56        _arc_num = countArcs(_graph);
    1.57 @@ -684,7 +684,7 @@
    1.58          _target[i] = _node_id[_graph.target(a)];
    1.59          if ((i += k) >= _arc_num) i = (i % k) + 1;
    1.60        }
    1.61 -      
    1.62 +
    1.63        // Initialize maps
    1.64        for (int i = 0; i != _node_num; ++i) {
    1.65          _supply[i] = 0;
    1.66 @@ -809,7 +809,7 @@
    1.67        _supply[_node_id[t]] = -k;
    1.68        return *this;
    1.69      }
    1.70 -    
    1.71 +
    1.72      /// \brief Set the type of the supply constraints.
    1.73      ///
    1.74      /// This function sets the type of the supply/demand constraints.
    1.75 @@ -835,7 +835,7 @@
    1.76      ///
    1.77      /// This function runs the algorithm.
    1.78      /// The paramters can be specified using functions \ref lowerMap(),
    1.79 -    /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(), 
    1.80 +    /// \ref upperMap(), \ref costMap(), \ref supplyMap(), \ref stSupply(),
    1.81      /// \ref supplyType().
    1.82      /// For example,
    1.83      /// \code
    1.84 @@ -1054,7 +1054,7 @@
    1.85          _flow[i] = 0;
    1.86          _state[i] = STATE_LOWER;
    1.87        }
    1.88 -      
    1.89 +
    1.90        // Set data for the artificial root node
    1.91        _root = _node_num;
    1.92        _parent[_root] = -1;
    1.93 @@ -1228,7 +1228,7 @@
    1.94        // Search the cycle along the path form the second node to the root
    1.95        for (int u = second; u != join; u = _parent[u]) {
    1.96          e = _pred[u];
    1.97 -        d = _forward[u] ? 
    1.98 +        d = _forward[u] ?
    1.99            (_cap[e] == INF ? INF : _cap[e] - _flow[e]) : _flow[e];
   1.100          if (d <= delta) {
   1.101            delta = d;
   1.102 @@ -1435,7 +1435,7 @@
   1.103            updatePotential();
   1.104          }
   1.105        }
   1.106 -      
   1.107 +
   1.108        // Check feasibility
   1.109        for (int e = _search_arc_num; e != _all_arc_num; ++e) {
   1.110          if (_flow[e] != 0) return INFEASIBLE;
   1.111 @@ -1452,7 +1452,7 @@
   1.112            }
   1.113          }
   1.114        }
   1.115 -      
   1.116 +
   1.117        // Shift potentials to meet the requirements of the GEQ/LEQ type
   1.118        // optimality conditions
   1.119        if (_sum_supply == 0) {