Changeset 1298:a78e5b779b69 in lemon for lemon/network_simplex.h
- Timestamp:
- 10/17/13 15:08:41 (11 years ago)
- Branch:
- default
- Children:
- 1299:b6bad215bccd, 1300:62dba6c90f35
- Parents:
- 1294:15e233f588da (diff), 1297:c0c2f5c87aa6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/network_simplex.h
r1270 r1298 199 199 200 200 // Parameters of the problem 201 bool _ha ve_lower;201 bool _has_lower; 202 202 SupplyType _stype; 203 203 Value _sum_supply; … … 683 683 template <typename LowerMap> 684 684 NetworkSimplex& lowerMap(const LowerMap& map) { 685 _ha ve_lower = true;685 _has_lower = true; 686 686 for (ArcIt a(_graph); a != INVALID; ++a) { 687 687 _lower[_arc_id[a]] = map[a]; … … 880 880 _cost[i] = 1; 881 881 } 882 _ha ve_lower = false;882 _has_lower = false; 883 883 _stype = GEQ; 884 884 return *this; … … 1073 1073 1074 1074 // Remove non-zero lower bounds 1075 if (_ha ve_lower) {1075 if (_has_lower) { 1076 1076 for (int i = 0; i != _arc_num; ++i) { 1077 1077 Value c = _lower[i]; … … 1236 1236 } 1237 1237 1238 // Check if the upper bound is greater or equal to the lower bound1238 // Check if the upper bound is greater than or equal to the lower bound 1239 1239 // on each arc. 1240 1240 bool checkBoundMaps() { … … 1613 1613 1614 1614 // Transform the solution and the supply map to the original form 1615 if (_ha ve_lower) {1615 if (_has_lower) { 1616 1616 for (int i = 0; i != _arc_num; ++i) { 1617 1617 Value c = _lower[i]; -
lemon/network_simplex.h
r1297 r1298 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-201 05 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 42 42 /// \ref NetworkSimplex implements the primal Network Simplex algorithm 43 43 /// for finding a \ref min_cost_flow "minimum cost flow" 44 /// \ ref amo93networkflows, \refdantzig63linearprog,45 /// \ refkellyoneill91netsimplex.44 /// \cite amo93networkflows, \cite dantzig63linearprog, 45 /// \cite kellyoneill91netsimplex. 46 46 /// This algorithm is a highly efficient specialized version of the 47 47 /// linear programming simplex method directly for the minimum cost … … 974 974 /// 975 975 /// This function returns the total cost of the found flow. 976 /// Its complexity is O( e).976 /// Its complexity is O(m). 977 977 /// 978 978 /// \note The return type of the function can be specified as a … … 1235 1235 return true; 1236 1236 } 1237 1237 1238 1238 // Check if the upper bound is greater than or equal to the lower bound 1239 1239 // on each arc. … … 1517 1517 } 1518 1518 } else { 1519 // Find the min. cost incom ming arc for each demand node1519 // Find the min. cost incoming arc for each demand node 1520 1520 for (int i = 0; i != int(demand_nodes.size()); ++i) { 1521 1521 Node v = demand_nodes[i];
Note: See TracChangeset
for help on using the changeset viewer.