COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
12/01/05 16:08:46 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2396
Message:

NewEdgeSetAdaptor? -> ListEdgeSet?
and moved to edge_set.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/erasable_graph_extender.h

    r1627 r1842  
    4747
    4848  template <typename _Base>
     49  class ErasableEdgeSetExtender : public _Base {
     50  public:
     51
     52    typedef ErasableEdgeSetExtender Graph;
     53    typedef _Base Parent;
     54
     55    typedef typename Parent::Edge Edge;
     56
     57    void erase(const Edge& edge) {
     58      Parent::getNotifier(Edge()).erase(edge);
     59      Parent::erase(edge);
     60    }
     61
     62  };
     63
     64  template <typename _Base>
    4965  class ErasableUndirGraphExtender : public _Base {
    5066  public:
     
    8096  };
    8197
     98  template <typename _Base>
     99  class ErasableUndirEdgeSetExtender : public _Base {
     100  public:
     101
     102    typedef ErasableUndirEdgeSetExtender Graph;
     103    typedef _Base Parent;
     104
     105    typedef typename Parent::Node Node;
     106    typedef typename Parent::UndirEdge UndirEdge;
     107    typedef typename Parent::Edge Edge;
     108
     109    void erase(const UndirEdge& uedge) {
     110      std::vector<Edge> edges;
     111      edges.push_back(Parent::direct(uedge,true));
     112      edges.push_back(Parent::direct(uedge,false));
     113      Parent::getNotifier(Edge()).erase(edges);
     114      Parent::getNotifier(UndirEdge()).erase(uedge);
     115      Parent::erase(uedge);
     116    }
     117
     118  };
     119
    82120}
    83121
Note: See TracChangeset for help on using the changeset viewer.