Changeset 1297:c0c2f5c87aa6 in lemon
 Timestamp:
 10/17/13 09:30:57 (9 years ago)
 Branch:
 default
 Phase:
 public
 Location:
 lemon
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

lemon/capacity_scaling.h
r1296 r1297 161 161 162 162 // Parameters of the problem 163 bool _ha ve_lower;163 bool _has_lower; 164 164 Value _sum_supply; 165 165 … … 354 354 template <typename LowerMap> 355 355 CapacityScaling& lowerMap(const LowerMap& map) { 356 _ha ve_lower = true;356 _has_lower = true; 357 357 for (ArcIt a(_graph); a != INVALID; ++a) { 358 358 _lower[_arc_idf[a]] = map[a]; … … 540 540 _cost[j] = _forward[j] ? 1 : 1; 541 541 } 542 _ha ve_lower = false;542 _has_lower = false; 543 543 return *this; 544 544 } … … 751 751 const Value MAX = std::numeric_limits<Value>::max(); 752 752 int last_out; 753 if (_ha ve_lower) {753 if (_has_lower) { 754 754 for (int i = 0; i != _root; ++i) { 755 755 last_out = _first_out[i+1]; … … 854 854 855 855 // Handle nonzero lower bounds 856 if (_ha ve_lower) {856 if (_has_lower) { 857 857 int limit = _first_out[_root]; 858 858 for (int j = 0; j != limit; ++j) { 
lemon/cost_scaling.h
r1296 r1297 252 252 253 253 // Parameters of the problem 254 bool _ha ve_lower;254 bool _has_lower; 255 255 Value _sum_supply; 256 256 int _sup_node_num; … … 368 368 template <typename LowerMap> 369 369 CostScaling& lowerMap(const LowerMap& map) { 370 _ha ve_lower = true;370 _has_lower = true; 371 371 for (ArcIt a(_graph); a != INVALID; ++a) { 372 372 _lower[_arc_idf[a]] = map[a]; … … 563 563 _scost[_reverse[j]] = 0; 564 564 } 565 _ha ve_lower = false;565 _has_lower = false; 566 566 return *this; 567 567 } … … 775 775 const Value MAX = std::numeric_limits<Value>::max(); 776 776 int last_out; 777 if (_ha ve_lower) {777 if (_has_lower) { 778 778 for (int i = 0; i != _root; ++i) { 779 779 last_out = _first_out[i+1]; … … 832 832 sup[n] = _supply[_node_id[n]]; 833 833 } 834 if (_ha ve_lower) {834 if (_has_lower) { 835 835 for (ArcIt a(_graph); a != INVALID; ++a) { 836 836 int j = _arc_idf[a]; … … 986 986 987 987 // Handle nonzero lower bounds 988 if (_ha ve_lower) {988 if (_has_lower) { 989 989 int limit = _first_out[_root]; 990 990 for (int j = 0; j != limit; ++j) { 
lemon/cycle_canceling.h
r1296 r1297 196 196 197 197 // Parameters of the problem 198 bool _ha ve_lower;198 bool _has_lower; 199 199 Value _sum_supply; 200 200 … … 279 279 template <typename LowerMap> 280 280 CycleCanceling& lowerMap(const LowerMap& map) { 281 _ha ve_lower = true;281 _has_lower = true; 282 282 for (ArcIt a(_graph); a != INVALID; ++a) { 283 283 _lower[_arc_idf[a]] = map[a]; … … 471 471 _cost[_reverse[j]] = 0; 472 472 } 473 _ha ve_lower = false;473 _has_lower = false; 474 474 return *this; 475 475 } … … 684 684 const Value MAX = std::numeric_limits<Value>::max(); 685 685 int last_out; 686 if (_ha ve_lower) {686 if (_has_lower) { 687 687 for (int i = 0; i != _root; ++i) { 688 688 last_out = _first_out[i+1]; … … 727 727 sup[n] = _supply[_node_id[n]]; 728 728 } 729 if (_ha ve_lower) {729 if (_has_lower) { 730 730 for (ArcIt a(_graph); a != INVALID; ++a) { 731 731 int j = _arc_idf[a]; … … 835 835 836 836 // Handle nonzero lower bounds 837 if (_ha ve_lower) {837 if (_has_lower) { 838 838 int limit = _first_out[_root]; 839 839 for (int j = 0; j != limit; ++j) { 
lemon/network_simplex.h
r1296 r1297 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 nonzero 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]; … … 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];
Note: See TracChangeset
for help on using the changeset viewer.