lemon/bits/edge_set_extender.h
changeset 2542 faaa54ec4520
parent 2391 14a343be7a5a
child 2553 bfced05fa852
equal deleted inserted replaced
8:209ca8105977 9:6be802158f1f
   588     // Alteration extension
   588     // Alteration extension
   589 
   589 
   590     UEdge addEdge(const Node& from, const Node& to) {
   590     UEdge addEdge(const Node& from, const Node& to) {
   591       UEdge uedge = Parent::addEdge(from, to);
   591       UEdge uedge = Parent::addEdge(from, to);
   592       notifier(UEdge()).add(uedge);
   592       notifier(UEdge()).add(uedge);
   593       notifier(Edge()).add(Parent::direct(uedge, true));
   593       std::vector<Edge> edges;
   594       notifier(Edge()).add(Parent::direct(uedge, false));
   594       edges.push_back(Parent::direct(uedge, true));
       
   595       edges.push_back(Parent::direct(uedge, false));
       
   596       notifier(Edge()).add(edges);
   595       return uedge;
   597       return uedge;
   596     }
   598     }
   597     
   599     
   598     void clear() {
   600     void clear() {
   599       notifier(Edge()).clear();
   601       notifier(Edge()).clear();
   600       notifier(UEdge()).clear();
   602       notifier(UEdge()).clear();
   601       Parent::clear();
   603       Parent::clear();
   602     }
   604     }
   603 
   605 
   604     void erase(const UEdge& uedge) {
   606     void erase(const UEdge& uedge) {
   605       notifier(Edge()).erase(Parent::direct(uedge, true));
   607       std::vector<Edge> edges;
   606       notifier(Edge()).erase(Parent::direct(uedge, false));
   608       edges.push_back(Parent::direct(uedge, true));
       
   609       edges.push_back(Parent::direct(uedge, false));
       
   610       notifier(Edge()).erase(edges);
   607       notifier(UEdge()).erase(uedge);
   611       notifier(UEdge()).erase(uedge);
   608       Parent::erase(uedge);
   612       Parent::erase(uedge);
   609     }
   613     }
   610 
   614 
   611 
   615