Changeset 470:b64956c701c9 in lemon0.x for src/work/jacint/preflow.h
 Timestamp:
 04/29/04 13:09:12 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@621
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/jacint/preflow.h
r469 r470 154 154 break; 155 155 } 156 // default: 157 // break; 158 // ZERO_FLOW ize kell 159 156 default: 157 break; 160 158 } 161 159 … … 218 216 InEdgeIt e; 219 217 for(g>first(e,v); g>valid(e); g>next(e)) { 220 if ( (*capacity)[e] == (*flow)[e] ) continue;218 if ( (*capacity)[e] <= (*flow)[e] ) continue; 221 219 Node u=g>tail(e); 222 220 if ( level[u] >= n ) { … … 229 227 OutEdgeIt f; 230 228 for(g>first(f,v); g>valid(f); g>next(f)) { 231 if ( 0 == (*flow)[f] ) continue;229 if ( 0 >= (*flow)[f] ) continue; 232 230 Node u=g>head(f); 233 231 if ( level[u] >= n ) { … … 389 387 for(g>first(e,w); g>valid(e); g>next(e)) { 390 388 391 if ( (*flow)[e] == (*capacity)[e] ) continue;389 if ( (*flow)[e] >= (*capacity)[e] ) continue; 392 390 Node v=g>head(e); 393 391 394 392 if( lev > level[v] ) { //Push is allowed now 395 393 396 if ( excess[v] ==0 && v!=t && v!=s ) {394 if ( excess[v]<=0 && v!=t && v!=s ) { 397 395 int lev_v=level[v]; 398 396 active[lev_v].push(v); … … 422 420 for(g>first(e,w); g>valid(e); g>next(e)) { 423 421 424 if( (*flow)[e] == 0 ) continue;422 if( (*flow)[e] <= 0 ) continue; 425 423 Node v=g>tail(e); 426 424 427 425 if( lev > level[v] ) { //Push is allowed now 428 426 429 if ( excess[v] ==0 && v!=t && v!=s ) {427 if ( excess[v]<=0 && v!=t && v!=s ) { 430 428 int lev_v=level[v]; 431 429 active[lev_v].push(v); … … 494 492 { 495 493 Num c=(*capacity)[e]; 496 if ( c == 0 ) continue;494 if ( c <= 0 ) continue; 497 495 Node w=g>head(e); 498 496 if ( level[w] < n ) { 499 if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);497 if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w); 500 498 flow>set(e, c); 501 499 excess.set(w, excess[w]+c); … … 521 519 InEdgeIt e; 522 520 for(g>first(e,v); g>valid(e); g>next(e)) { 523 if ( (*capacity)[e] == (*flow)[e] ) continue;521 if ( (*capacity)[e] <= (*flow)[e] ) continue; 524 522 Node w=g>tail(e); 525 523 if ( level[w] == n && w != s ) { … … 535 533 OutEdgeIt f; 536 534 for(g>first(f,v); g>valid(f); g>next(f)) { 537 if ( 0 == (*flow)[f] ) continue;535 if ( 0 >= (*flow)[f] ) continue; 538 536 Node w=g>head(f); 539 537 if ( level[w] == n && w != s ) { … … 554 552 { 555 553 Num rem=(*capacity)[e](*flow)[e]; 556 if ( rem == 0 ) continue;554 if ( rem <= 0 ) continue; 557 555 Node w=g>head(e); 558 556 if ( level[w] < n ) { 559 if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);557 if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w); 560 558 flow>set(e, (*capacity)[e]); 561 559 excess.set(w, excess[w]+rem); … … 566 564 for(g>first(f,s); g>valid(f); g>next(f)) 567 565 { 568 if ( (*flow)[f] == 0 ) continue;566 if ( (*flow)[f] <= 0 ) continue; 569 567 Node w=g>tail(f); 570 568 if ( level[w] < n ) { 571 if ( excess[w] == 0 && w!=t ) active[level[w]].push(w);569 if ( excess[w] <= 0 && w!=t ) active[level[w]].push(w); 572 570 excess.set(w, excess[w]+(*flow)[f]); 573 571 flow>set(f, 0); … … 583 581 void relabel(Node w, int newlevel, VecStack& active, 584 582 VecNode& level_list, NNMap& left, 585 NNMap& right, int& b, int& k, constbool what_heur ) {583 NNMap& right, int& b, int& k, bool what_heur ) { 586 584 587 585 Num lev=level[w];
Note: See TracChangeset
for help on using the changeset viewer.