[Lemon-commits] [lemon_svn] marci: r712 - hugo/trunk/src/work/marci
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:41:05 CET 2006
Author: marci
Date: Thu May 6 15:44:48 2004
New Revision: 712
Modified:
hugo/trunk/src/work/marci/bipartite_graphs.h
hugo/trunk/src/work/marci/makefile
Log:
Modified: hugo/trunk/src/work/marci/bipartite_graphs.h
==============================================================================
--- hugo/trunk/src/work/marci/bipartite_graphs.h (original)
+++ hugo/trunk/src/work/marci/bipartite_graphs.h Thu May 6 15:44:48 2004
@@ -35,5 +35,26 @@
}
return true;
}
+
+ /// experimental topsort,
+ /// I think the final version will work as an iterator
+ template<typename Graph>
+ void topSort(Graph& g, std::list<typename Graph::Node>& l) {
+ l.clear();
+ typedef typename Graph::template NodeMap<bool> ReachedMap;
+ ReachedMap reached(g/*, false*/);
+ DfsIterator<Graph, ReachedMap> dfs(g, reached);
+ FOR_EACH_LOC(typename Graph::NodeIt, n, g) {
+ if (!reached[n]) {
+ dfs.pushAndSetReached(n);
+ while (!bfs.finished()) {
+ if (bfs.isANodeExamined()) {
+ l.push_back(bfs.aNode());
+ }
+ ++bfs;
+ }
+ }
+ }
+ }
}
#endif //HUGO_BIPARTITE_GRAPHS_H
Modified: hugo/trunk/src/work/marci/makefile
==============================================================================
--- hugo/trunk/src/work/marci/makefile (original)
+++ hugo/trunk/src/work/marci/makefile Thu May 6 15:44:48 2004
@@ -1,7 +1,7 @@
CXX2 = g++-2.95
CXX3=$(CXX)
BOOSTROOT ?= /home/marci/boost
-INCLUDEDIRS ?= -I../../include -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
+INCLUDEDIRS ?= -I../../hugo -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
BINARIES = max_flow_demo iterator_bfs_demo macro_test lg_vs_sg bfsit_vs_byhand bipartite_graph_wrapper_test bipartite_matching_try bipartite_matching_try_2 bipartite_matching_try_3
More information about the Lemon-commits
mailing list