Changeset 1071:879fcb781086 in lemon-main
- Timestamp:
- 07/30/13 15:24:45 (11 years ago)
- Branch:
- default
- Parents:
- 1069:d1a48668ddb4 (diff), 1070:ee9bac10f58e (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
- Location:
- lemon
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/capacity_scaling.h
r1053 r1071 740 740 if (_sum_supply > 0) return INFEASIBLE; 741 741 742 // Check lower and upper bounds 743 LEMON_DEBUG(checkBoundMaps(), 744 "Upper bounds must be greater or equal to the lower bounds"); 745 746 742 747 // Initialize vectors 743 748 for (int i = 0; i != _root; ++i) { … … 832 837 833 838 return OPTIMAL; 839 } 840 841 // Check if the upper bound is greater or equal to the lower bound 842 // on each arc. 843 bool checkBoundMaps() { 844 for (int j = 0; j != _res_arc_num; ++j) { 845 if (_upper[j] < _lower[j]) return false; 846 } 847 return true; 834 848 } 835 849 -
lemon/capacity_scaling.h
r1070 r1071 67 67 /// \ref CapacityScaling implements the capacity scaling version 68 68 /// of the successive shortest path algorithm for finding a 69 /// \ref min_cost_flow "minimum cost flow" \ref amo93networkflows, 70 /// \ref edmondskarp72theoretical. It is an efficient dual 71 /// solution method. 69 /// \ref min_cost_flow "minimum cost flow" \cite amo93networkflows, 70 /// \cite edmondskarp72theoretical. It is an efficient dual 71 /// solution method, which runs in polynomial time 72 /// \f$O(e\log U (n+e)\log n)\f$, where <i>U</i> denotes the maximum 73 /// of node supply and arc capacity values. 72 74 /// 73 75 /// This algorithm is typically slower than \ref CostScaling and -
lemon/cost_scaling.h
r1053 r1071 764 764 if (_sum_supply > 0) return INFEASIBLE; 765 765 766 // Check lower and upper bounds 767 LEMON_DEBUG(checkBoundMaps(), 768 "Upper bounds must be greater or equal to the lower bounds"); 769 766 770 767 771 // Initialize vectors … … 899 903 900 904 return OPTIMAL; 905 } 906 907 // Check if the upper bound is greater or equal to the lower bound 908 // on each arc. 909 bool checkBoundMaps() { 910 for (int j = 0; j != _res_arc_num; ++j) { 911 if (_upper[j] < _lower[j]) return false; 912 } 913 return true; 901 914 } 902 915 -
lemon/cost_scaling.h
r1070 r1071 92 92 /// \ref CostScaling implements a cost scaling algorithm that performs 93 93 /// push/augment and relabel operations for finding a \ref min_cost_flow 94 /// "minimum cost flow" \ ref amo93networkflows, \refgoldberg90approximation,95 /// \ ref goldberg97efficient, \refbunnagel98efficient.94 /// "minimum cost flow" \cite amo93networkflows, \cite goldberg90approximation, 95 /// \cite goldberg97efficient, \cite bunnagel98efficient. 96 96 /// It is a highly efficient primal-dual solution method, which 97 97 /// can be viewed as the generalization of the \ref Preflow 98 98 /// "preflow push-relabel" algorithm for the maximum flow problem. 99 /// It is a polynomial algorithm, its running time complexity is 100 /// \f$O(n^2e\log(nK))\f$, where <i>K</i> denotes the maximum arc cost. 99 101 /// 100 102 /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest … … 1283 1285 _buckets[r] = _bucket_next[u]; 1284 1286 1285 // Search the incom ming arcs of u1287 // Search the incoming arcs of u 1286 1288 LargeCost pi_u = _pi[u]; 1287 1289 int last_out = _first_out[u+1]; -
lemon/cycle_canceling.h
r1053 r1071 671 671 if (_sum_supply > 0) return INFEASIBLE; 672 672 673 // Check lower and upper bounds 674 LEMON_DEBUG(checkBoundMaps(), 675 "Upper bounds must be greater or equal to the lower bounds"); 676 673 677 674 678 // Initialize vectors … … 779 783 780 784 return OPTIMAL; 785 } 786 787 // Check if the upper bound is greater or equal to the lower bound 788 // on each arc. 789 bool checkBoundMaps() { 790 for (int j = 0; j != _res_arc_num; ++j) { 791 if (_upper[j] < _lower[j]) return false; 792 } 793 return true; 781 794 } 782 795 -
lemon/cycle_canceling.h
r1070 r1071 48 48 /// \ref CycleCanceling implements three different cycle-canceling 49 49 /// algorithms for finding a \ref min_cost_flow "minimum cost flow" 50 /// \ ref amo93networkflows, \refklein67primal,51 /// \ refgoldberg89cyclecanceling.50 /// \cite amo93networkflows, \cite klein67primal, 51 /// \cite goldberg89cyclecanceling. 52 52 /// The most efficent one is the \ref CANCEL_AND_TIGHTEN 53 53 /// "Cancel-and-Tighten" algorithm, thus it is the default method. 54 /// It runs in strongly polynomial time , but in practice, it is typically55 /// orders of magnitude slower than the scaling algorithms and56 /// \ref NetworkSimplex.54 /// It runs in strongly polynomial time O(n<sup>2</sup>e<sup>2</sup>log(n)), 55 /// but in practice, it is typically orders of magnitude slower than 56 /// the scaling algorithms and \ref NetworkSimplex. 57 57 /// (For more information, see \ref min_cost_flow_algs "the module page".) 58 58 /// … … 132 132 /// The "Minimum Mean Cycle-Canceling" algorithm, which is a 133 133 /// well-known strongly polynomial method 134 /// \ refgoldberg89cyclecanceling. It improves along a134 /// \cite goldberg89cyclecanceling. It improves along a 135 135 /// \ref min_mean_cycle "minimum mean cycle" in each iteration. 136 136 /// Its running time complexity is O(n<sup>2</sup>e<sup>3</sup>log(n)). … … 138 138 /// The "Cancel-and-Tighten" algorithm, which can be viewed as an 139 139 /// improved version of the previous method 140 /// \ refgoldberg89cyclecanceling.140 /// \cite goldberg89cyclecanceling. 141 141 /// It is faster both in theory and in practice, its running time 142 142 /// complexity is O(n<sup>2</sup>e<sup>2</sup>log(n)). -
lemon/network_simplex.h
r1053 r1071 1068 1068 (_stype == LEQ && _sum_supply >= 0)) ) return false; 1069 1069 1070 // Check lower and upper bounds 1071 LEMON_DEBUG(checkBoundMaps(), 1072 "Upper bounds must be greater or equal to the lower bounds"); 1073 1070 1074 // Remove non-zero lower bounds 1071 1075 if (_have_lower) { … … 1231 1235 return true; 1232 1236 } 1237 1238 // Check if the upper bound is greater or equal to the lower bound 1239 // on each arc. 1240 bool checkBoundMaps() { 1241 for (int j = 0; j != _arc_num; ++j) { 1242 if (_upper[j] < _lower[j]) return false; 1243 } 1244 return true; 1245 } 1233 1246 1234 1247 // Find the join node -
lemon/network_simplex.h
r1070 r1071 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 … … 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.