COIN-OR::LEMON - Graph Library

Changeset 498:eb8bfa683d92 in lemon-0.x


Ignore:
Timestamp:
04/30/04 18:46:19 (16 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@658
Message:

bipartite graphs

Location:
src/work/marci
Files:
3 edited
1 copied

Legend:

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

    r497 r498  
    206206    /// the \c bool parameter which can be \c S_Class or \c T_Class shows
    207207    /// the color class where the new node is to be inserted.
    208     void addNode(bool);
     208    Node addNode(bool b) {
     209      Node n=Parent::graph->addNode();
     210      bipartite_map.update();
     211      s_false_t_true_map.insert(n, b);
     212      return n;
     213    }
    209214
    210215    /// A new edge is inserted.
    211216    ///\pre \c tail have to be in \c S_Class and \c head in \c T_Class.
    212     void addEdge(const Node& tail, const Node& head);
    213 
    214     void erase(const Node&);
    215     void erase(const Edge&);
     217    Edge addEdge(const Node& tail, const Node& head) {
     218      return Parent::graph->addEdge(tail, head);
     219    }
     220
     221    void erase(const Node& n) {
     222      s_false_t_true_map.remove(n);
     223      Parent::graph->erase(n);
     224    }
     225    void erase(const Edge& e) {
     226      Parent::graph->erase(e);
     227    }
    216228   
    217229    void clear() {
  • src/work/marci/bipartite_matching_try.cc

    r496 r498  
    113113//   }
    114114
    115   BGW::NodeMap<int> dbyj(bgw);
    116   BGW::EdgeMap<int> dbyxcj(bgw);
     115//  BGW::NodeMap<int> dbyj(bgw);
     116//  BGW::EdgeMap<int> dbyxcj(bgw);
    117117
    118118  typedef stGraphWrapper<BGW> stGW;
  • src/work/marci/bipartite_matching_try_2.cc

    r496 r498  
    113113//   }
    114114
    115   BGW::NodeMap<int> dbyj(bgw);
    116   BGW::EdgeMap<int> dbyxcj(bgw);
     115//  BGW::NodeMap<int> dbyj(bgw);
     116//  BGW::EdgeMap<int> dbyxcj(bgw);
    117117
    118118  typedef stGraphWrapper<BGW> stGW;
  • src/work/marci/makefile

    r476 r498  
    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
     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
    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.