src/lemon/bits/erasable_graph_extender.h
changeset 1431 ad44b1dd8013
parent 1307 d4acebef7276
equal deleted inserted replaced
0:229d1bb79b6b 1:a0f990bd0ee4
     1 // -*- c++ -*-
     1 // -*- c++ -*-
     2 
     2 
     3 #ifndef LEMON_ERASABLE_GRAPH_EXTENDER_H
     3 #ifndef LEMON_ERASABLE_GRAPH_EXTENDER_H
     4 #define LEMON_ERASABLE_GRAPH_EXTENDER_H
     4 #define LEMON_ERASABLE_GRAPH_EXTENDER_H
       
     5 
       
     6 #include <vector>
     5 
     7 
     6 #include <lemon/invalid.h>
     8 #include <lemon/invalid.h>
     7 
     9 
     8 
    10 
     9 namespace lemon {
    11 namespace lemon {
    65       Parent::getNotifier(Node()).erase(node);
    67       Parent::getNotifier(Node()).erase(node);
    66       Parent::erase(node);
    68       Parent::erase(node);
    67     }
    69     }
    68     
    70     
    69     void erase(const UndirEdge& uedge) {
    71     void erase(const UndirEdge& uedge) {
    70       Parent::getNotifier(Edge()).erase(Edge(uedge,true));
    72       std::vector<Edge> edges;
    71       Parent::getNotifier(Edge()).erase(Edge(uedge,false));
    73       edges.push_back(Edge(uedge,true));
       
    74       edges.push_back(Edge(uedge,false));
       
    75       Parent::getNotifier(Edge()).erase(edges);
    72       Parent::getNotifier(UndirEdge()).erase(uedge);
    76       Parent::getNotifier(UndirEdge()).erase(uedge);
    73       Parent::erase(uedge);
    77       Parent::erase(uedge);
    74     }
    78     }
    75 
    79 
    76   };
    80   };