equal
deleted
inserted
replaced
948 private: |
948 private: |
949 typedef typename /*GraphWrapperSkeleton<GraphWrapper>*/ |
949 typedef typename /*GraphWrapperSkeleton<GraphWrapper>*/ |
950 GraphWrapper::OutEdgeIt OldOutEdgeIt; |
950 GraphWrapper::OutEdgeIt OldOutEdgeIt; |
951 typedef typename /*GraphWrapperSkeleton<GraphWrapper>*/ |
951 typedef typename /*GraphWrapperSkeleton<GraphWrapper>*/ |
952 GraphWrapper::InEdgeIt OldInEdgeIt; |
952 GraphWrapper::InEdgeIt OldInEdgeIt; |
|
953 |
|
954 typedef typename /*GraphWrapperSkeleton<GraphWrapper>*/ |
|
955 GraphWrapper::Edge OldEdge; |
953 protected: |
956 protected: |
954 //const Graph* graph; |
957 //const Graph* graph; |
955 //GraphWrapper gw; |
958 //GraphWrapper gw; |
956 FlowMap* flow; |
959 FlowMap* flow; |
957 const CapacityMap* capacity; |
960 const CapacityMap* capacity; |
990 friend bool operator!=(const Edge& u, const Edge& v) { |
993 friend bool operator!=(const Edge& u, const Edge& v) { |
991 if (v.out_or_in) |
994 if (v.out_or_in) |
992 return (!u.out_or_in || u.out!=v.out); |
995 return (!u.out_or_in || u.out!=v.out); |
993 else |
996 else |
994 return (u.out_or_in || u.in!=v.in); |
997 return (u.out_or_in || u.in!=v.in); |
995 } |
998 } |
|
999 operator OldEdge() { |
|
1000 if(out_or_in) |
|
1001 return out; |
|
1002 else |
|
1003 return in; |
|
1004 } |
996 }; |
1005 }; |
997 |
1006 |
998 |
1007 |
999 class OutEdgeIt : public Edge { |
1008 class OutEdgeIt : public Edge { |
1000 friend class ResGraphWrapper<GraphWrapper, Number, FlowMap, CapacityMap>; |
1009 friend class ResGraphWrapper<GraphWrapper, Number, FlowMap, CapacityMap>; |
1206 else |
1215 else |
1207 return (flow->get(e.in)); |
1216 return (flow->get(e.in)); |
1208 } |
1217 } |
1209 |
1218 |
1210 Number resCap(OldOutEdgeIt out) const { |
1219 Number resCap(OldOutEdgeIt out) const { |
1211 return (capacity->get(out)-flow->get(out)); |
1220 return ( (*capacity)[out] - (*flow)[out]); |
1212 } |
1221 } |
1213 |
1222 |
1214 Number resCap(OldInEdgeIt in) const { |
1223 Number resCap(OldInEdgeIt in) const { |
1215 return (flow->get(in)); |
1224 return ( (*flow)[in] ); |
1216 } |
1225 } |
1217 |
1226 |
1218 // template<typename T> class NodeMap : public GraphWrapper::NodeMap<T> { |
1227 // template<typename T> class NodeMap : public GraphWrapper::NodeMap<T> { |
1219 // public: |
1228 // public: |
1220 // NodeMap(const ResGraphWrapper<GraphWrapper, Number, FlowMap, CapacityMap>& _G) |
1229 // NodeMap(const ResGraphWrapper<GraphWrapper, Number, FlowMap, CapacityMap>& _G) |