COIN-OR::LEMON - Graph Library

Changeset 888:cc3590763f7f in lemon-0.x


Ignore:
Timestamp:
09/20/04 11:05:19 (15 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1196
Message:
 
Location:
src
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • src/demo/sub_graph_wrapper_demo.cc

    r871 r888  
    1515#include <hugo/dimacs.h>
    1616#include <hugo/preflow.h>
    17 #include <tight_edge_filter_map.h>
     17#include <hugo/tight_edge_filter_map.h>
    1818
    1919using namespace hugo;
  • src/hugo/graph_wrapper.h

    r879 r888  
    10971097      typedef Number ValueType;
    10981098      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) { }
    11011101      Number operator[](const Edge& e) const {
    11021102        if (res_graph->forward(e))
  • src/work/marci/augmenting_flow.h

    r863 r888  
    1010#include <hugo/invalid.h>
    1111#include <hugo/maps.h>
    12 #include <tight_edge_filter_map.h>
     12#include <hugo/tight_edge_filter_map.h>
    1313
    1414/// \file
     
    248248  {
    249249    ResGW res_graph(*g, *capacity, *flow);
     250    typename ResGW::ResCap res_cap(res_graph);
     251
    250252    bool _augment=false;
    251253
     
    268270        pred.set(w, e);
    269271        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]));
    271273        } else {
    272           free.set(w, res_graph.resCap(e));
     274          free.set(w, res_cap[e]);
    273275        }
    274276        if (res_graph.head(e)==t) { _augment=true; break; }
     
    296298  {
    297299    ResGW res_graph(*g, *capacity, *flow);
     300    typename ResGW::ResCap res_cap(res_graph);
     301
    298302    bool _augment=false;
    299303
     
    325329        pred.set(w, e);
    326330        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]));
    328332        } else {
    329           free.set(w, res_graph.resCap(e));
     333          free.set(w, res_cap[e]);
    330334        }
    331335        if (res_graph.head(e)==t) { _augment=true; break; }
     
    358362
    359363    ResGW res_graph(*g, *capacity, *flow);
     364    typename ResGW::ResCap res_cap(res_graph);
    360365
    361366    //bfs for distances on the residual graph
     
    393398          original_edge.set(f, e);
    394399          //residual_capacity.update();
    395           residual_capacity.set(f, res_graph.resCap(e));
     400          residual_capacity.set(f, res_cap[e]);
    396401        } else {
    397402          if (dist[res_graph.head(e)]==(dist[res_graph.tail(e)]+1)) {
     
    401406            original_edge.set(f, e);
    402407            //residual_capacity.update();
    403             residual_capacity.set(f, res_graph.resCap(e));
     408            residual_capacity.set(f, res_cap[e]);
    404409          }
    405410        }
     
    473478
    474479    ResGW res_graph(*g, *capacity, *flow);
     480    typename ResGW::ResCap res_cap(res_graph);
    475481
    476482    //Potential map, for distances from s
     
    550556            if (pred[v]!=INVALID) {
    551557              free1.set
    552                 (w, std::min(free1[v], res_graph.resCap
    553                              (typename ErasingResGW::Edge(dfs))));
     558                (w, std::min(free1[v], res_cap
     559                             [typename ErasingResGW::Edge(dfs)]));
    554560            } else {
    555561              free1.set
    556                 (w, res_graph.resCap
    557                  (typename ErasingResGW::Edge(dfs)));
     562                (w, res_cap
     563                 [typename ErasingResGW::Edge(dfs)]);
    558564            }
    559565
     
    577583          res_graph.augment(e, augment_value);
    578584          n=erasing_res_graph.tail(e);
    579           if (res_graph.resCap(e)==0)
     585          if (res_cap[e]==0)
    580586            erasing_res_graph.erase(e);
    581587        }
  • src/work/marci/lp/lp_solver_wrapper.h

    r768 r888  
    340340      lpx_set_row_bnds(lp, row_iter_map[row_it], bound_type, lo, up);
    341341    }
    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    }
    345346    ///.
    346347    void solveSimplex() { lpx_simplex(lp); }
Note: See TracChangeset for help on using the changeset viewer.