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

 1 added
 1 deleted
 4 edited
Legend:
 Unmodified
 Added
 Removed

src/demo/sub_graph_wrapper_demo.cc
r871 r888 15 15 #include <hugo/dimacs.h> 16 16 #include <hugo/preflow.h> 17 #include < tight_edge_filter_map.h>17 #include <hugo/tight_edge_filter_map.h> 18 18 19 19 using namespace hugo; 
src/hugo/graph_wrapper.h
r879 r888 1097 1097 typedef Number ValueType; 1098 1098 typedef Edge KeyType; 1099 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _res_graph) :1100 res_graph(&_res_graph) { }1099 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& 1100 _res_graph) : res_graph(&_res_graph) { } 1101 1101 Number operator[](const Edge& e) const { 1102 1102 if (res_graph>forward(e)) 
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 } 
src/work/marci/lp/lp_solver_wrapper.h
r768 r888 340 340 lpx_set_row_bnds(lp, row_iter_map[row_it], bound_type, lo, up); 341 341 } 342 // void setObjCoef(const RowIt& row_it, double obj_coef) { 343 // lpx_set_obj_coef(lp, row_iter_map[row_it], obj_coef); 344 // } 342 ///. 343 void setObjCoef(const ColIt& col_it, double obj_coef) { 344 lpx_set_obj_coef(lp, col_iter_map[col_it], obj_coef); 345 } 345 346 ///. 346 347 void solveSimplex() { lpx_simplex(lp); }
Note: See TracChangeset
for help on using the changeset viewer.