Changeset 660:edb42cb9d352 in lemon-0.x for src/hugo
- Timestamp:
- 05/25/04 15:13:52 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@863
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/graph_wrapper.h
r658 r660 1462 1462 } 1463 1463 1464 typedef typename Parent::Edge Edge; 1465 1464 1466 // bool forward(const Parent::Edge& e) const { return Parent::forward(e); } 1465 1467 //bool backward(const Edge& e) const { return e.backward; } 1466 1468 1467 void augment(const typename Parent::Edge& e, Number a) const {1469 void augment(const Edge& e, Number a) const { 1468 1470 if (Parent::forward(e)) 1469 1471 // flow->set(e.out, flow->get(e.out)+a); … … 1474 1476 } 1475 1477 1476 Number resCap(const typename Parent::Edge& e) const { 1478 /// \deprecated 1479 /// 1480 Number resCap(const Edge& e) const { 1477 1481 if (Parent::forward(e)) 1478 1482 // return (capacity->get(e.out)-flow->get(e.out)); … … 1483 1487 } 1484 1488 1489 /// \brief Residual capacity map. 1490 /// 1491 /// In generic residual graphs the residual capacity can be obtained as a map. 1492 class ResCap { 1493 protected: 1494 const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph; 1495 public: 1496 typedef Number ValueType; 1497 typedef Edge KeyType; 1498 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _res_graph) : 1499 res_graph(&_res_graph) { } 1500 Number operator[](const Edge& e) const { 1501 if (res_graph->forward(e)) 1502 // return (capacity->get(e.out)-flow->get(e.out)); 1503 return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; 1504 else 1505 // return (flow->get(e.in)); 1506 return (*(res_graph->flow))[e]; 1507 } 1508 /// \bug not needed with dynamic maps, or does it? 1509 void update() { } 1510 }; 1511 1485 1512 }; 1486 1487 1488 1513 1489 1514
Note: See TracChangeset
for help on using the changeset viewer.