Changeset 910:f3bc4e9b5f3a in lemon for lemon/capacity_scaling.h
 Timestamp:
 02/20/10 18:39:03 (10 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/capacity_scaling.h
r887 r910 135 135 136 136 typedef std::vector<int> IntVector; 137 typedef std::vector<char> BoolVector;138 137 typedef std::vector<Value> ValueVector; 139 138 typedef std::vector<Cost> CostVector; 139 typedef std::vector<char> BoolVector; 140 // Note: vector<char> is used instead of vector<bool> for efficiency reasons 140 141 141 142 private: … … 765 766 if (_factor > 1) { 766 767 // With scaling 767 Value max_sup = 0, max_dem = 0 ;768 for (int i = 0; i != _ node_num; ++i) {768 Value max_sup = 0, max_dem = 0, max_cap = 0; 769 for (int i = 0; i != _root; ++i) { 769 770 Value ex = _excess[i]; 770 771 if ( ex > max_sup) max_sup = ex; 771 772 if (ex > max_dem) max_dem = ex; 772 }773 Value max_cap = 0;774 for (int j = 0; j != _res_arc_num; ++j) {775 if (_res_cap[j] > max_cap) max_cap = _res_cap[j];773 int last_out = _first_out[i+1]  1; 774 for (int j = _first_out[i]; j != last_out; ++j) { 775 if (_res_cap[j] > max_cap) max_cap = _res_cap[j]; 776 } 776 777 } 777 778 max_sup = std::min(std::min(max_sup, max_dem), max_cap);
Note: See TracChangeset
for help on using the changeset viewer.