Changeset 986:e997802b855c in lemon-0.x for src/lemon/min_cost_flow.h
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/min_cost_flow.h
r941 r986 104 104 ValueType operator[](typename ResGW::Edge e) const { 105 105 if (g.forward(e)) 106 return length[e]-(pot[g. head(e)]-pot[g.tail(e)]);106 return length[e]-(pot[g.target(e)]-pot[g.source(e)]); 107 107 else 108 return -length[e]-(pot[g. head(e)]-pot[g.tail(e)]);108 return -length[e]-(pot[g.target(e)]-pot[g.source(e)]); 109 109 } 110 110 … … 236 236 for(typename Graph::EdgeIt e(g); e!=INVALID; ++e) { 237 237 //C^{\Pi}_{i,j} 238 mod_pot = length[e]-potential[g. head(e)]+potential[g.tail(e)];238 mod_pot = length[e]-potential[g.target(e)]+potential[g.source(e)]; 239 239 fl_e = flow[e]; 240 240 if (0<fl_e && fl_e<capacity[e]) {
Note: See TracChangeset
for help on using the changeset viewer.