Bug fix
authordeba
Mon, 06 Feb 2006 20:32:29 +0000
changeset 1964df0b07457083
parent 1963 f1ace6d02a32
child 1965 71b3bc042c47
Bug fix
lemon/sub_graph.h
     1.1 --- a/lemon/sub_graph.h	Mon Feb 06 17:00:41 2006 +0000
     1.2 +++ b/lemon/sub_graph.h	Mon Feb 06 20:32:29 2006 +0000
     1.3 @@ -275,6 +275,7 @@
     1.4  	Parent::operator[](node).firstIn = INVALID;
     1.5  	Parent::operator[](node).firstOut = INVALID;
     1.6        }
     1.7 +
     1.8        virtual void add(const std::vector<Node>& nodes) {
     1.9  	Parent::add(nodes);
    1.10  	for (int i = 0; i < (int)nodes.size(); ++i) {
    1.11 @@ -356,7 +357,7 @@
    1.12  	for (int i = 0; i < (int)edges.size(); ++i) {
    1.13  	  adaptor.hide(edges[i]);
    1.14  	}
    1.15 -	Parent::erase(edge);
    1.16 +	Parent::erase(edges);
    1.17        }
    1.18  
    1.19      private:
    1.20 @@ -586,6 +587,14 @@
    1.21  	Parent::operator[](node).firstOut = INVALID;
    1.22        }
    1.23  
    1.24 +      virtual void add(const std::vector<Node>& nodes) {
    1.25 +        Parent::add(nodes);
    1.26 +        for (int i = 0; i < (int)nodes.size(); ++i) {
    1.27 +          Parent::operator[](nodes[i]).firstIn = INVALID;
    1.28 +          Parent::operator[](nodes[i]).firstOut = INVALID;
    1.29 +        }
    1.30 +      }
    1.31 +
    1.32      private:
    1.33        SubGraph& adaptor;
    1.34      };
    1.35 @@ -646,7 +655,7 @@
    1.36  	for (int i = 0; i < (int)edges.size(); ++i) {
    1.37  	  adaptor.hide(edges[i]);
    1.38  	}
    1.39 -	Parent::erase(edge);
    1.40 +	Parent::erase(edges);
    1.41        }
    1.42  
    1.43      private: