Changeset 986:e997802b855c in lemon0.x for src/lemon/preflow.h
 Timestamp:
 11/13/04 13:53:28 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1376
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/lemon/preflow.h
r977 r986 306 306 for(InEdgeIt e(*g,v); e!=INVALID; ++e) { 307 307 if ( (*capacity)[e] <= (*flow)[e] ) continue; 308 Node u=g> tail(e);308 Node u=g>source(e); 309 309 if ( level[u] >= n ) { 310 310 bfs_queue.push(u); … … 319 319 for(OutEdgeIt e(*g,v); e!=INVALID; ++e) { 320 320 if ( 0 >= (*flow)[e] ) continue; 321 Node u=g> head(e);321 Node u=g>target(e); 322 322 if ( level[u] >= n ) { 323 323 bfs_queue.push(u); … … 411 411 412 412 for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) { 413 Node v=g> head(e);413 Node v=g>target(e); 414 414 if (!M[v] && (*flow)[e] < (*capacity)[e] ) { 415 415 queue.push(v); … … 419 419 420 420 for(InEdgeIt e(*g,w) ; e!=INVALID; ++e) { 421 Node v=g> tail(e);421 Node v=g>source(e); 422 422 if (!M[v] && (*flow)[e] > 0 ) { 423 423 queue.push(v); … … 449 449 450 450 for(InEdgeIt e(*g,w) ; e!=INVALID; ++e) { 451 Node v=g> tail(e);451 Node v=g>source(e); 452 452 if (M[v] && (*flow)[e] < (*capacity)[e] ) { 453 453 queue.push(v); … … 457 457 458 458 for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) { 459 Node v=g> head(e);459 Node v=g>target(e); 460 460 if (M[v] && (*flow)[e] > 0 ) { 461 461 queue.push(v); … … 516 516 for(OutEdgeIt e(*g,w) ; e!=INVALID; ++e) { 517 517 if ( (*flow)[e] >= (*capacity)[e] ) continue; 518 Node v=g> head(e);518 Node v=g>target(e); 519 519 520 520 if( lev > level[v] ) { //Push is allowed now … … 548 548 549 549 if( (*flow)[e] <= 0 ) continue; 550 Node v=g> tail(e);550 Node v=g>source(e); 551 551 552 552 if( lev > level[v] ) { //Push is allowed now … … 603 603 for(InEdgeIt e(*g,v) ; e!=INVALID; ++e) { 604 604 if ( (*capacity)[e] <= (*flow)[e] ) continue; 605 Node w=g> tail(e);605 Node w=g>source(e); 606 606 if ( level[w] == n && w != s ) { 607 607 bfs_queue.push(w); … … 616 616 for(OutEdgeIt e(*g,v) ; e!=INVALID; ++e) { 617 617 if ( 0 >= (*flow)[e] ) continue; 618 Node w=g> head(e);618 Node w=g>target(e); 619 619 if ( level[w] == n && w != s ) { 620 620 bfs_queue.push(w); … … 647 647 648 648 for(InEdgeIt e(*g,v) ; e!=INVALID; ++e) { 649 Node w=g> tail(e);649 Node w=g>source(e); 650 650 if ( level[w] == n && w != s ) { 651 651 bfs_queue.push(w); … … 663 663 Num c=(*capacity)[e]; 664 664 if ( c <= 0 ) continue; 665 Node w=g> head(e);665 Node w=g>target(e); 666 666 if ( level[w] < n ) { 667 667 if ( excess[w] <= 0 && w!=t ) { //putting into the stack … … 688 688 Num rem=(*capacity)[e](*flow)[e]; 689 689 if ( rem <= 0 ) continue; 690 Node w=g> head(e);690 Node w=g>target(e); 691 691 if ( level[w] < n ) { 692 692 if ( excess[w] <= 0 && w!=t ) { //putting into the stack … … 701 701 for(InEdgeIt e(*g,s); e!=INVALID; ++e) { 702 702 if ( (*flow)[e] <= 0 ) continue; 703 Node w=g> tail(e);703 Node w=g>source(e); 704 704 if ( level[w] < n ) { 705 705 if ( excess[w] <= 0 && w!=t ) { … … 718 718 Num rem=(*capacity)[e](*flow)[e]; 719 719 if ( rem <= 0 ) continue; 720 Node w=g> head(e);720 Node w=g>target(e); 721 721 if ( level[w] < n ) flow>set(e, (*capacity)[e]); 722 722 } … … 724 724 for(InEdgeIt e(*g,s) ; e!=INVALID; ++e) { 725 725 if ( (*flow)[e] <= 0 ) continue; 726 Node w=g> tail(e);726 Node w=g>source(e); 727 727 if ( level[w] < n ) flow>set(e, 0); 728 728 }
Note: See TracChangeset
for help on using the changeset viewer.