COIN-OR::LEMON - Graph Library

Changeset 910:5a89cacf17f1 in lemon-0.x for src/hugo/min_cost_flow.h


Ignore:
Timestamp:
09/27/04 20:11:27 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1221
Message:

minor corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/hugo/min_cost_flow.h

    r906 r910  
    7272
    7373
    74     typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResGraphType;
    75     typedef typename ResGraphType::Edge ResGraphEdge;
     74    typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResGW;
     75    typedef typename ResGW::Edge ResGraphEdge;
    7676
    7777    class ModLengthMap {   
    7878      typedef typename Graph::template NodeMap<Length> NodeMap;
    79       const ResGraphType& G;
     79      const ResGW& G;
    8080      const LengthMap &ol;
    8181      const NodeMap &pot;
     
    8484      typedef typename LengthMap::ValueType ValueType;
    8585       
    86       ValueType operator[](typename ResGraphType::Edge e) const {     
     86      ValueType operator[](typename ResGW::Edge e) const {     
    8787        if (G.forward(e))
    8888          return  ol[e]-(pot[G.head(e)]-pot[G.tail(e)]);   
     
    9191      }     
    9292       
    93       ModLengthMap(const ResGraphType& _G,
     93      ModLengthMap(const ResGW& _G,
    9494                   const LengthMap &o,  const NodeMap &p) :
    9595        G(_G), /*rev(_rev),*/ ol(o), pot(p){};
     
    153153     
    154154      //We need a residual graph
    155       ResGraphType res_graph(G, capacity, flow);
     155      ResGW res_graph(G, capacity, flow);
    156156
    157157
    158158      ModLengthMap mod_length(res_graph, length, potential);
    159159
    160       Dijkstra<ResGraphType, ModLengthMap> dijkstra(res_graph, mod_length);
     160      Dijkstra<ResGW, ModLengthMap> dijkstra(res_graph, mod_length);
    161161
    162162      int i;
     
    169169       
    170170        //We have to change the potential
    171         for(typename ResGraphType::NodeIt n(res_graph); n!=INVALID; ++n)
     171        for(typename ResGW::NodeIt n(res_graph); n!=INVALID; ++n)
    172172          potential[n] += dijkstra.distMap()[n];
    173173
Note: See TracChangeset for help on using the changeset viewer.