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/extendable_graph_extender.h

    r1820 r1842  
    3131
    3232  template <typename _Base>
     33  class ExtendableEdgeSetExtender : public _Base {
     34  public:
     35
     36    typedef ExtendableEdgeSetExtender Graph;
     37    typedef _Base Parent;
     38
     39    typedef typename Parent::Edge Edge;
     40    typedef typename Parent::Node Node;
     41
     42    Edge addEdge(const Node& from, const Node& to) {
     43      Edge edge = Parent::addEdge(from, to);
     44      Parent::getNotifier(Edge()).add(edge);
     45      return edge;
     46    }
     47
     48  };
     49
     50  template <typename _Base>
    3351  class ExtendableUndirGraphExtender : public _Base {
    3452  public:
     
    4664      return node;
    4765    }
     66
     67    UndirEdge addEdge(const Node& from, const Node& to) {
     68      UndirEdge uedge = Parent::addEdge(from, to);
     69      Parent::getNotifier(UndirEdge()).add(uedge);
     70
     71      std::vector<Edge> edges;
     72      edges.push_back(Parent::direct(uedge, true));
     73      edges.push_back(Parent::direct(uedge, false));
     74      Parent::getNotifier(Edge()).add(edges);
     75
     76      return uedge;
     77    }
     78
     79  };
     80
     81  template <typename _Base>
     82  class ExtendableUndirEdgeSetExtender : public _Base {
     83  public:
     84
     85    typedef ExtendableUndirEdgeSetExtender Graph;
     86    typedef _Base Parent;
     87
     88    typedef typename Parent::Node Node;
     89    typedef typename Parent::Edge Edge;
     90    typedef typename Parent::UndirEdge UndirEdge;
    4891
    4992    UndirEdge addEdge(const Node& from, const Node& to) {
Note: See TracChangeset for help on using the changeset viewer.