Changeset 888:cc3590763f7f in lemon0.x for src/work/marci/augmenting_flow.h
 Timestamp:
 09/20/04 11:05:19 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1196
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/work/marci/augmenting_flow.h
r863 r888 10 10 #include <hugo/invalid.h> 11 11 #include <hugo/maps.h> 12 #include < tight_edge_filter_map.h>12 #include <hugo/tight_edge_filter_map.h> 13 13 14 14 /// \file … … 248 248 { 249 249 ResGW res_graph(*g, *capacity, *flow); 250 typename ResGW::ResCap res_cap(res_graph); 251 250 252 bool _augment=false; 251 253 … … 268 270 pred.set(w, e); 269 271 if (pred[v]!=INVALID) { 270 free.set(w, std::min(free[v], res_ graph.resCap(e)));272 free.set(w, std::min(free[v], res_cap[e])); 271 273 } else { 272 free.set(w, res_ graph.resCap(e));274 free.set(w, res_cap[e]); 273 275 } 274 276 if (res_graph.head(e)==t) { _augment=true; break; } … … 296 298 { 297 299 ResGW res_graph(*g, *capacity, *flow); 300 typename ResGW::ResCap res_cap(res_graph); 301 298 302 bool _augment=false; 299 303 … … 325 329 pred.set(w, e); 326 330 if (pred[v]!=INVALID) { 327 free.set(w, std::min(free[v], res_ graph.resCap(e)));331 free.set(w, std::min(free[v], res_cap[e])); 328 332 } else { 329 free.set(w, res_ graph.resCap(e));333 free.set(w, res_cap[e]); 330 334 } 331 335 if (res_graph.head(e)==t) { _augment=true; break; } … … 358 362 359 363 ResGW res_graph(*g, *capacity, *flow); 364 typename ResGW::ResCap res_cap(res_graph); 360 365 361 366 //bfs for distances on the residual graph … … 393 398 original_edge.set(f, e); 394 399 //residual_capacity.update(); 395 residual_capacity.set(f, res_ graph.resCap(e));400 residual_capacity.set(f, res_cap[e]); 396 401 } else { 397 402 if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) { … … 401 406 original_edge.set(f, e); 402 407 //residual_capacity.update(); 403 residual_capacity.set(f, res_ graph.resCap(e));408 residual_capacity.set(f, res_cap[e]); 404 409 } 405 410 } … … 473 478 474 479 ResGW res_graph(*g, *capacity, *flow); 480 typename ResGW::ResCap res_cap(res_graph); 475 481 476 482 //Potential map, for distances from s … … 550 556 if (pred[v]!=INVALID) { 551 557 free1.set 552 (w, std::min(free1[v], res_ graph.resCap553 (typename ErasingResGW::Edge(dfs))));558 (w, std::min(free1[v], res_cap 559 [typename ErasingResGW::Edge(dfs)])); 554 560 } else { 555 561 free1.set 556 (w, res_ graph.resCap557 (typename ErasingResGW::Edge(dfs)));562 (w, res_cap 563 [typename ErasingResGW::Edge(dfs)]); 558 564 } 559 565 … … 577 583 res_graph.augment(e, augment_value); 578 584 n=erasing_res_graph.tail(e); 579 if (res_ graph.resCap(e)==0)585 if (res_cap[e]==0) 580 586 erasing_res_graph.erase(e); 581 587 }
Note: See TracChangeset
for help on using the changeset viewer.