Changeset 624:2e2618612b68 in lemon-0.x
- Timestamp:
- 05/12/04 15:55:37 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@814
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/graph_wrapper.h
r623 r624 1236 1236 typename Graph::template EdgeMap<T> forward_map, backward_map; 1237 1237 public: 1238 typedef T ValueType; 1239 typedef Edge KeyType; 1238 1240 EdgeMap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _G) : forward_map(*(_G.graph)), backward_map(*(_G.graph)) { } 1239 1241 EdgeMap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _G, T a) : forward_map(*(_G.graph), a), backward_map(*(_G.graph), a) { } 1240 1242 void set(Edge e, T a) { 1241 1243 if (!e.backward) 1242 forward_map.set(e .out, a);1244 forward_map.set(e/*.out*/, a); 1243 1245 else 1244 backward_map.set(e .in, a);1246 backward_map.set(e/*.in*/, a); 1245 1247 } 1246 1248 T operator[](Edge e) const { 1247 1249 if (!e.backward) 1248 return forward_map[e .out];1250 return forward_map[e/*.out*/]; 1249 1251 else 1250 return backward_map[e .in];1252 return backward_map[e/*.in*/]; 1251 1253 } 1252 1254 // T get(Edge e) const {
Note: See TracChangeset
for help on using the changeset viewer.