Changeset 540:405ccc3105e1 in lemon-0.x for src/work
- Timestamp:
- 05/06/04 15:44:48 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@712
- Location:
- src/work/marci
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/bipartite_graphs.h
r455 r540 36 36 return true; 37 37 } 38 39 /// experimental topsort, 40 /// I think the final version will work as an iterator 41 template<typename Graph> 42 void topSort(Graph& g, std::list<typename Graph::Node>& l) { 43 l.clear(); 44 typedef typename Graph::template NodeMap<bool> ReachedMap; 45 ReachedMap reached(g/*, false*/); 46 DfsIterator<Graph, ReachedMap> dfs(g, reached); 47 FOR_EACH_LOC(typename Graph::NodeIt, n, g) { 48 if (!reached[n]) { 49 dfs.pushAndSetReached(n); 50 while (!bfs.finished()) { 51 if (bfs.isANodeExamined()) { 52 l.push_back(bfs.aNode()); 53 } 54 ++bfs; 55 } 56 } 57 } 58 } 38 59 } 39 60 #endif //HUGO_BIPARTITE_GRAPHS_H -
src/work/marci/makefile
r510 r540 2 2 CXX3=$(CXX) 3 3 BOOSTROOT ?= /home/marci/boost 4 INCLUDEDIRS ?= -I../../ include-I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)4 INCLUDEDIRS ?= -I../../hugo -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT) 5 5 6 6 LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
Note: See TracChangeset
for help on using the changeset viewer.