equal
deleted
inserted
replaced
1094 protected: |
1094 protected: |
1095 const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph; |
1095 const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph; |
1096 public: |
1096 public: |
1097 typedef Number ValueType; |
1097 typedef Number ValueType; |
1098 typedef Edge KeyType; |
1098 typedef Edge KeyType; |
1099 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _res_graph) : |
1099 ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& |
1100 res_graph(&_res_graph) { } |
1100 _res_graph) : res_graph(&_res_graph) { } |
1101 Number operator[](const Edge& e) const { |
1101 Number operator[](const Edge& e) const { |
1102 if (res_graph->forward(e)) |
1102 if (res_graph->forward(e)) |
1103 return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; |
1103 return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; |
1104 else |
1104 else |
1105 return (*(res_graph->flow))[e]; |
1105 return (*(res_graph->flow))[e]; |