Changeset 101:d2ac583ed195 in lemon0.x
 Timestamp:
 02/18/04 22:50:45 (18 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@131
 Location:
 src/work/jacint
 Files:

 1 added
 2 edited
Legend:
 Unmodified
 Added
 Removed

src/work/jacint/preflow_hl2.h
r98 r101 81 81 TMap excess(G); 82 82 83 std::vector<int> numb(n +1);83 std::vector<int> numb(n); 84 84 /* 85 85 The number of nodes on level i < n. It is … … 119 119 for(OutEdgeIt e=G.template first<OutEdgeIt>(s); e.valid(); ++e) 120 120 { 121 if ( capacity.get(e) == 0 ) continue; 121 T c=capacity.get(e); 122 if ( c == 0 ) continue; 122 123 NodeIt w=G.head(e); 123 124 if ( w!=s ) { 124 125 if ( excess.get(w) == 0 && w!=t ) stack[level.get(w)].push(w); 125 flow.set(e, c apacity.get(e));126 excess.set(w, excess.get(w)+c apacity.get(e));127 } 126 flow.set(e, c); 127 excess.set(w, excess.get(w)+c); 128 } 128 129 } 129 130 … … 156 157 int lev=level.get(w); 157 158 int exc=excess.get(w); 158 int newlevel=2*n 2; //In newlevel we bound the next level of w.159 int newlevel=2*n; //In newlevel we bound the next level of w. 159 160 160 161 // if ( level.get(w) < n ) { //Nem tudom ez mukodike 
src/work/jacint/preflow_push_hl.h
r97 r101 1 1 // * C++ * 2 3 //kerdesek: nem tudom lehete a 4 //kieleket csak a legf n szintu pontokra nezni. 5 2 6 /* 3 7 preflow_push_hl.h … … 117 121 for(OutEdgeIt e=G.template first<OutEdgeIt>(s); e.valid(); ++e) 118 122 { 119 if ( capacity.get(e) == 0 ) continue; 123 T c=capacity.get(e); 124 if ( c == 0 ) continue; 120 125 NodeIt w=G.head(e); 121 126 if ( w!=s ) { 122 127 if ( excess.get(w) == 0 && w!=t ) stack[level.get(w)].push(w); 123 flow.set(e, c apacity.get(e));124 excess.set(w, excess.get(w)+c apacity.get(e));128 flow.set(e, c); 129 excess.set(w, excess.get(w)+c); 125 130 } 126 131 } … … 145 150 int lev=level.get(w); 146 151 int exc=excess.get(w); 147 int newlevel=2*n2; //In newlevel we bound the next level of w. 148 152 int newlevel=2*n; //In newlevel we bound the next level of w. 153 //vagy MAXINT 154 149 155 // if ( level.get(w) < n ) { //Nem tudom ez mukodike 150 156 for(OutEdgeIt e=G.template first<OutEdgeIt>(w); e.valid(); ++e) {
Note: See TracChangeset
for help on using the changeset viewer.