lemon/edge_set.h
changeset 2015 5e51c9eb5e83
parent 1990 15fb7a4ea6be
child 2031 080d51024ac5
equal deleted inserted replaced
7:688afdd3d1fe 8:cc10a3f3be59
   569 
   569 
   570   protected:
   570   protected:
   571 
   571 
   572     typedef typename Parent::NodesImplBase NodesImplBase;
   572     typedef typename Parent::NodesImplBase NodesImplBase;
   573 
   573 
   574     void eraseNode(const Node&) {
   574     void eraseNode(const Node& node) {
       
   575       if (Parent::InEdgeIt(*this, node) == INVALID &&
       
   576           Parent::OutEdgeIt(*this, node) == INVALID) {
       
   577         return;
       
   578       }
   575       throw UnsupportedOperation();
   579       throw UnsupportedOperation();
   576     }
   580     }
   577     
   581     
   578     void clearNodes() {
   582     void clearNodes() {
   579       Parent::clear();
   583       Parent::clear();
   660 
   664 
   661   protected:
   665   protected:
   662 
   666 
   663     typedef typename Parent::NodesImplBase NodesImplBase;
   667     typedef typename Parent::NodesImplBase NodesImplBase;
   664 
   668 
   665     void eraseNode(const Node&) {
   669     void eraseNode(const Node& node) {
       
   670       if (Parent::IncEdgeIt(*this, node) == INVALID) {
       
   671         return;
       
   672       }
   666       throw UnsupportedOperation();
   673       throw UnsupportedOperation();
   667     }
   674     }
   668     
   675     
   669     void clearNodes() {
   676     void clearNodes() {
   670       Parent::clear();
   677       Parent::clear();