[Lemon-commits] [lemon_svn] alpar: r118 - hugo/trunk/src/work/alpar
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:37:26 CET 2006
Author: alpar
Date: Tue Feb 17 13:27:49 2004
New Revision: 118
Modified:
hugo/trunk/src/work/alpar/f_ed_ka.h
hugo/trunk/src/work/alpar/f_ed_ka_demo.cc
Log:
.
Modified: hugo/trunk/src/work/alpar/f_ed_ka.h
==============================================================================
--- hugo/trunk/src/work/alpar/f_ed_ka.h (original)
+++ hugo/trunk/src/work/alpar/f_ed_ka.h Tue Feb 17 13:27:49 2004
@@ -16,10 +16,10 @@
typename FlowMap::ValueType maxFlow(Graph &G,
FlowMap &f,
CapacityMap &c,
- typename Graph::NodeIt s,
- typename Graph::NodeIt t)
+ typename Graph::EachNodeIt s,
+ typename Graph::EachNodeIt t)
{
- typedef typename Graph::NodeIt NodeIt;
+ typedef typename Graph::EachNodeIt EachNodeIt;
typedef typename Graph::EdgeIt EdgeIt;
typedef typename Graph::EachEdgeIt EachEdgeIt;
typedef typename Graph::OutEdgeIt OutEdgeIt;
@@ -32,18 +32,18 @@
for(EachEdgeIt e(G);G.valid(e);G.next(e))
f.set(e,0);
- std::queue<NodeIt> bfs_queue;
+ std::queue<EachNodeIt> bfs_queue;
typename Graph::NodeMap<int> visited(G); //0: unvisited,
//1: reached by a forward edge
//2: reached by a backward edge
//3: it is node s
typename Graph::NodeMap<EdgeIt> tree(G);
- NodeIt gn; //FIXME: it might be too global for some people...
+ EachNodeIt gn; //FIXME: it might be too global for some people...
augment:
- for(NodeIt n(G);G.valid(n);G.next(n))
+ for(EachNodeIt n(G);G.valid(n);G.next(n))
visited.set(n,0);
visited.set(s,3);
@@ -55,7 +55,7 @@
while(!bfs_queue.empty() && !visited.get(t))
{
- NodeIt n(bfs_queue.front());
+ EachNodeIt n(bfs_queue.front());
for(OutEdgeIt e(G,n);G.valid(e);G.next(e))
if(f.get(e)<c.get(e) && //FIXME: <
!visited.get(G.bNode(e)))
Modified: hugo/trunk/src/work/alpar/f_ed_ka_demo.cc
==============================================================================
--- hugo/trunk/src/work/alpar/f_ed_ka_demo.cc (original)
+++ hugo/trunk/src/work/alpar/f_ed_ka_demo.cc Tue Feb 17 13:27:49 2004
@@ -12,11 +12,11 @@
// read_dimacs_demo < dimacs_max_flow_file
int main(int, char **) {
- typedef ListGraph::NodeIt NodeIt;
+ typedef ListGraph::EachNodeIt EachNodeIt;
typedef ListGraph::EachEdgeIt EachEdgeIt;
ListGraph G;
- NodeIt s, t;
+ EachNodeIt s, t;
ListGraph::EdgeMap<int> cap(G);
readDimacsMaxFlow(std::cin, G, s, t, cap);
More information about the Lemon-commits
mailing list