Changeset 910:5a89cacf17f1 in lemon-0.x for src/hugo/min_cost_flow.h
- Timestamp:
- 09/27/04 20:11:27 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1221
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/min_cost_flow.h
r906 r910 72 72 73 73 74 typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResG raphType;75 typedef typename ResG raphType::Edge ResGraphEdge;74 typedef ResGraphWrapper<const Graph,int,CapacityMap,EdgeIntMap> ResGW; 75 typedef typename ResGW::Edge ResGraphEdge; 76 76 77 77 class ModLengthMap { 78 78 typedef typename Graph::template NodeMap<Length> NodeMap; 79 const ResG raphType& G;79 const ResGW& G; 80 80 const LengthMap &ol; 81 81 const NodeMap &pot; … … 84 84 typedef typename LengthMap::ValueType ValueType; 85 85 86 ValueType operator[](typename ResG raphType::Edge e) const {86 ValueType operator[](typename ResGW::Edge e) const { 87 87 if (G.forward(e)) 88 88 return ol[e]-(pot[G.head(e)]-pot[G.tail(e)]); … … 91 91 } 92 92 93 ModLengthMap(const ResG raphType& _G,93 ModLengthMap(const ResGW& _G, 94 94 const LengthMap &o, const NodeMap &p) : 95 95 G(_G), /*rev(_rev),*/ ol(o), pot(p){}; … … 153 153 154 154 //We need a residual graph 155 ResG raphTyperes_graph(G, capacity, flow);155 ResGW res_graph(G, capacity, flow); 156 156 157 157 158 158 ModLengthMap mod_length(res_graph, length, potential); 159 159 160 Dijkstra<ResG raphType, ModLengthMap> dijkstra(res_graph, mod_length);160 Dijkstra<ResGW, ModLengthMap> dijkstra(res_graph, mod_length); 161 161 162 162 int i; … … 169 169 170 170 //We have to change the potential 171 for(typename ResG raphType::NodeIt n(res_graph); n!=INVALID; ++n)171 for(typename ResGW::NodeIt n(res_graph); n!=INVALID; ++n) 172 172 potential[n] += dijkstra.distMap()[n]; 173 173
Note: See TracChangeset
for help on using the changeset viewer.