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

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


Author: marci
Date: Sat Jul 24 16:01:31 2004
New Revision: 995

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

Log:
correction of some bugs pointed by alpar


Modified: hugo/trunk/src/hugo/graph_wrapper.h
==============================================================================
--- hugo/trunk/src/hugo/graph_wrapper.h	(original)
+++ hugo/trunk/src/hugo/graph_wrapper.h	Sat Jul 24 16:01:31 2004
@@ -210,7 +210,7 @@
     bool forward(const Edge& e) const { return graph->forward(e); }
     bool backward(const Edge& e) const { return graph->backward(e); }
     
-    Edge opposite(const Edge& e) const { Edge(graph->opposite(e)); }
+    Edge opposite(const Edge& e) const { return Edge(graph->opposite(e)); }
 
     template<typename T> class NodeMap : public Graph::template NodeMap<T> { 
       typedef typename Graph::template NodeMap<T> Parent;
@@ -1010,6 +1010,10 @@
       Parent::setForwardFilterMap(cm);
       Parent::setBackwardFilterMap(cm);
     }
+
+    int edgeNum() const { 
+      return 2*this->graph->edgeNum();
+    }
   };
 
 
@@ -1388,7 +1392,7 @@
     void setCapacity(const CapacityMap& _capacity) { capacity=&_capacity; }
     void setFlow(const FlowMap& _flow) { flow=&_flow; }
     bool operator[](const typename Graph::Edge& e) const {
-      return ((*flow)[e] < (*capacity)[e]);
+      return (Number((*flow)[e]) < Number((*capacity)[e]));
     }
   };
 
@@ -1407,7 +1411,7 @@
     void setCapacity(const CapacityMap& _capacity) { capacity=&_capacity; }
     void setFlow(const FlowMap& _flow) { flow=&_flow; }
     bool operator[](const typename Graph::Edge& e) const {
-      return (0 < (*flow)[e]);
+      return (Number(0) < Number((*flow)[e]));
     }
   };
 



More information about the Lemon-commits mailing list