.
1.1 --- a/src/work/marci/graph_wrapper.h Wed Mar 17 18:18:26 2004 +0000
1.2 +++ b/src/work/marci/graph_wrapper.h Thu Mar 18 11:35:41 2004 +0000
1.3 @@ -8,6 +8,7 @@
1.4
1.5 template<typename Graph>
1.6 class TrivGraphWrapper {
1.7 + protected:
1.8 Graph* graph;
1.9
1.10 public:
1.11 @@ -87,6 +88,7 @@
1.12 template<typename Graph>
1.13 class RevGraphWrapper
1.14 {
1.15 + protected:
1.16 Graph* graph;
1.17
1.18 public:
1.19 @@ -166,6 +168,7 @@
1.20
1.21 template<typename Graph>
1.22 class UndirGraphWrapper {
1.23 + protected:
1.24 Graph* graph;
1.25
1.26 public:
1.27 @@ -399,6 +402,7 @@
1.28 private:
1.29 typedef typename Graph::OutEdgeIt OldOutEdgeIt;
1.30 typedef typename Graph::InEdgeIt OldInEdgeIt;
1.31 + protected:
1.32 const Graph* graph;
1.33 FlowMap* flow;
1.34 const CapacityMap* capacity;
1.35 @@ -831,12 +835,12 @@
1.36 public:
1.37 FilterGraphWrapper(const Graph& _G, FlowMap& _flow,
1.38 const CapacityMap& _capacity) :
1.39 - ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this) {
1.40 + ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, graph->nodeNum()) {
1.41 }
1.42
1.43 OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const {
1.44 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::/*getF*/first(e, n);
1.45 - while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e))))
1.46 + while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e))))
1.47 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
1.48 return e;
1.49 }
1.50 @@ -847,7 +851,7 @@
1.51
1.52 OutEdgeIt& next(OutEdgeIt& e) const {
1.53 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
1.54 - while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e))))
1.55 + while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e))))
1.56 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
1.57 return e;
1.58 }
1.59 @@ -859,7 +863,7 @@
1.60 void erase(const Edge& e) {
1.61 OutEdgeIt f(e);
1.62 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
1.63 - while (valid(f) && (dist.get(tail(f))+1!=dist.get(head(f))))
1.64 + while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f))))
1.65 ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
1.66 first_out_edges.set(this->tail(e), f);
1.67 }