[Lemon-commits] [lemon_svn] marci: r277 - hugo/trunk/src/work/marci

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:38:29 CET 2006


Author: marci
Date: Thu Mar 18 12:35:41 2004
New Revision: 277

Modified:
   hugo/trunk/src/work/marci/graph_wrapper.h

Log:
.


Modified: hugo/trunk/src/work/marci/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/work/marci/graph_wrapper.h	(original)
+++ hugo/trunk/src/work/marci/graph_wrapper.h	Thu Mar 18 12:35:41 2004
@@ -8,6 +8,7 @@
 
   template<typename Graph>
   class TrivGraphWrapper {
+  protected:
     Graph* graph;
   
   public:
@@ -87,6 +88,7 @@
   template<typename Graph>
   class RevGraphWrapper
   {
+  protected:
     Graph* graph;
   
   public:
@@ -166,6 +168,7 @@
 
   template<typename Graph>
   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<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this) { 
+      ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, graph->nodeNum()) { 
     }
 
     OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const {
       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::/*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<Graph, Number, FlowMap, CapacityMap>::next(e);
       return e;
     }
@@ -847,7 +851,7 @@
 
     OutEdgeIt& next(OutEdgeIt& e) const {
       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::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<Graph, Number, FlowMap, CapacityMap>::next(e);
       return e;
     }
@@ -859,7 +863,7 @@
     void erase(const Edge& e) {
       OutEdgeIt f(e);
       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::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<Graph, Number, FlowMap, CapacityMap>::next(f);
       first_out_edges.set(this->tail(e), f);
     }



More information about the Lemon-commits mailing list