an experimental topsort
authormarci
Thu, 06 May 2004 13:48:48 +0000
changeset 5432b031f790e7a
parent 542 69bde1d90c04
child 544 347690b1df4e
an experimental topsort
src/work/marci/bfs_dfs_misc.h
     1.1 --- a/src/work/marci/bfs_dfs_misc.h	Thu May 06 13:48:04 2004 +0000
     1.2 +++ b/src/work/marci/bfs_dfs_misc.h	Thu May 06 13:48:48 2004 +0000
     1.3 @@ -1,6 +1,6 @@
     1.4  // -*- c++ -*-
     1.5 -#ifndef HUGO_BIPARTITE_GRAPHS_H
     1.6 -#define HUGO_BIPARTITE_GRAPHS_H
     1.7 +#ifndef HUGO_BFS_DFS_MISC_H
     1.8 +#define HUGO_BFS_DFS_MISC_H
     1.9  
    1.10  #include <bfs_iterator.h>
    1.11  #include <for_each_macros.h>
    1.12 @@ -47,14 +47,14 @@
    1.13      FOR_EACH_LOC(typename Graph::NodeIt, n, g) {
    1.14        if (!reached[n]) {
    1.15  	dfs.pushAndSetReached(n);
    1.16 -	while (!bfs.finished()) {
    1.17 -	  if (bfs.isANodeExamined()) {
    1.18 -	    l.push_back(bfs.aNode());
    1.19 +	while (!dfs.finished()) {
    1.20 +	  if (dfs.isANodeExamined()) {
    1.21 +	    l.push_back(dfs.aNode());
    1.22  	  }
    1.23 -	  ++bfs;
    1.24 +	  +dfs;
    1.25  	}
    1.26        }
    1.27      }
    1.28    }
    1.29  }
    1.30 -#endif //HUGO_BIPARTITE_GRAPHS_H
    1.31 +#endif //HUGO_BFS_DFS_MISC_H