COIN-OR::LEMON - Graph Library

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

bipartite graphs

File:
1 edited

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() {
Note: See TracChangeset for help on using the changeset viewer.