COIN-OR::LEMON - Graph Library

Changeset 549:5531429143bc in lemon-0.x for src/work


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

Legend:

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

    r548 r549  
    2020      if (!reached[n]) {
    2121        bfs.pushAndSetReached(n);
    22         bool_map.set(n, false) {
    23           while (!bfs.finished()) {
    24             if (bfs.isBNodeNewlyReached()) {
    25               bool_map.set(bfs.bNode())=!bfs.aNode();
    26             } else {
    27               if (bool_map[bfs.bNode()]==bool_map[bfs.aNode()]) {
    28                 return false;
    29               }
     22        bool_map.set(n, false);
     23        while (!bfs.finished()) {
     24          if (bfs.isBNodeNewlyReached()) {
     25            bool_map.set(bfs.bNode())=!bfs.aNode();
     26          } else {
     27            if (bool_map[bfs.bNode()]==bool_map[bfs.aNode()]) {
     28              return false;
    3029            }
    31             ++bfs;
    3230          }
     31          ++bfs;
    3332        }
    3433      }
    3534    }
     35   
    3636    return true;
    3737  }
     
    3939  /// experimental topsort,
    4040  /// I think the final version will work as an iterator
     41  /// if the graph is not a acyclic, the na pre-topological order is obtained
     42  /// (see Schrijver's book)
    4143  template<typename Graph>
    42   void topSort(Graph& g, std::list<typename Graph::Node>& l) {
     44  void topSort(const Graph& g, std::list<typename Graph::Node>& l) {
    4345    l.clear();
    4446    typedef typename Graph::template NodeMap<bool> ReachedMap;
  • src/work/marci/makefile

    r544 r549  
    55
    66LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo
    7 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
     7BINARIES = 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 top_sort_test
    88#gw_vs_not preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos edmonds_karp_demo_alpar preflow_demo_leda
    99
Note: See TracChangeset for help on using the changeset viewer.