COIN-OR::LEMON - Graph Library

Changeset 540:405ccc3105e1 in lemon-0.x


Ignore:
Timestamp:
05/06/04 15:44:48 (16 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@712
Message:
 
Location:
src/work/marci
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/bipartite_graphs.h

    r455 r540  
    3636    return true;
    3737  }
     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  }
    3859}
    3960#endif //HUGO_BIPARTITE_GRAPHS_H
  • src/work/marci/makefile

    r510 r540  
    22CXX3=$(CXX)
    33BOOSTROOT ?= /home/marci/boost
    4 INCLUDEDIRS ?= -I../../include -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
     4INCLUDEDIRS ?= -I../../hugo -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT)
    55
    66LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
Note: See TracChangeset for help on using the changeset viewer.