# HG changeset patch # User marci # Date 1090677691 0 # Node ID 56e60e9eb2da8679c221eba824289bc4707cc0c4 # Parent 2d867176d10e7a6e9e5166b2f7d6579ba3434dfc correction of some bugs pointed by alpar diff -r 2d867176d10e -r 56e60e9eb2da src/hugo/graph_wrapper.h --- a/src/hugo/graph_wrapper.h Fri Jul 23 17:13:23 2004 +0000 +++ b/src/hugo/graph_wrapper.h Sat Jul 24 14:01:31 2004 +0000 @@ -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 class NodeMap : public Graph::template NodeMap { typedef typename Graph::template NodeMap 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])); } };