# HG changeset patch # User marci # Date 1079609741 0 # Node ID 98b93792541ecdaa68690925f149ad12475bae84 # Parent 5cec393baade5a08f921a6e0d37c14fdd461e8e4 . diff -r 5cec393baade -r 98b93792541e src/work/marci/graph_wrapper.h --- a/src/work/marci/graph_wrapper.h Wed Mar 17 18:18:26 2004 +0000 +++ b/src/work/marci/graph_wrapper.h Thu Mar 18 11:35:41 2004 +0000 @@ -8,6 +8,7 @@ template class TrivGraphWrapper { + protected: Graph* graph; public: @@ -87,6 +88,7 @@ template class RevGraphWrapper { + protected: Graph* graph; public: @@ -166,6 +168,7 @@ template class UndirGraphWrapper { + protected: Graph* graph; public: @@ -399,6 +402,7 @@ private: typedef typename Graph::OutEdgeIt OldOutEdgeIt; typedef typename Graph::InEdgeIt OldInEdgeIt; + protected: const Graph* graph; FlowMap* flow; const CapacityMap* capacity; @@ -831,12 +835,12 @@ public: FilterGraphWrapper(const Graph& _G, FlowMap& _flow, const CapacityMap& _capacity) : - ErasingResGraphWrapper(_G, _flow, _capacity), dist(*this) { + ErasingResGraphWrapper(_G, _flow, _capacity), dist(*this, graph->nodeNum()) { } OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const { ErasingResGraphWrapper::/*getF*/first(e, n); - while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e)))) + while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e)))) ErasingResGraphWrapper::next(e); return e; } @@ -847,7 +851,7 @@ OutEdgeIt& next(OutEdgeIt& e) const { ErasingResGraphWrapper::next(e); - while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e)))) + while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e)))) ErasingResGraphWrapper::next(e); return e; } @@ -859,7 +863,7 @@ void erase(const Edge& e) { OutEdgeIt f(e); ErasingResGraphWrapper::next(f); - while (valid(f) && (dist.get(tail(f))+1!=dist.get(head(f)))) + while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f)))) ErasingResGraphWrapper::next(f); first_out_edges.set(this->tail(e), f); }