[Lemon-commits] [lemon_svn] alpar: r1055 - hugo/branches/hugo++/src/hugo
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:42:59 CET 2006
Author: alpar
Date: Fri Aug 27 16:49:54 2004
New Revision: 1055
Modified:
hugo/branches/hugo++/src/hugo/max_flow.h
Log:
It seems to be working.
Modified: hugo/branches/hugo++/src/hugo/max_flow.h
==============================================================================
--- hugo/branches/hugo++/src/hugo/max_flow.h (original)
+++ hugo/branches/hugo++/src/hugo/max_flow.h Fri Aug 27 16:49:54 2004
@@ -5,7 +5,7 @@
#include <vector>
#include <queue>
-#include <hugo/graph_wrapper.h>
+//#include <hugo/graph_wrapper.h>
#include <hugo/invalid.h>
#include <hugo/maps.h>
@@ -62,10 +62,10 @@
const CapMap* capacity;
FlowMap* flow;
int n; //the number of nodes of G
- typedef ResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;
+ // typedef ResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;
//typedef ExpResGraphWrapper<const Graph, Num, CapMap, FlowMap> ResGW;
- typedef typename ResGW::OutEdgeIt ResGWOutEdgeIt;
- typedef typename ResGW::Edge ResGWEdge;
+ // typedef typename ResGW::OutEdgeIt ResGWOutEdgeIt;
+ // typedef typename ResGW::Edge ResGWEdge;
typedef typename Graph::template NodeMap<int> ReachedMap;
@@ -590,11 +590,12 @@
break;
case GEN_FLOW:
for(NodeIt v(*g); v!=INVALID; ++v) excess.set(v,0);
-
- Num exc=0;
- for(InEdgeIt e(*g,t) ; e!=INVALID; ++e) exc+=(*flow)[e];
- for(OutEdgeIt e(*g,t) ; e!=INVALID; ++e) exc-=(*flow)[e];
- excess.set(t,exc);
+ {
+ Num exc=0;
+ for(InEdgeIt e(*g,t) ; e!=INVALID; ++e) exc+=(*flow)[e];
+ for(OutEdgeIt e(*g,t) ; e!=INVALID; ++e) exc-=(*flow)[e];
+ excess.set(t,exc);
+ }
break;
default:
break;
More information about the Lemon-commits
mailing list