# HG changeset patch # User deba # Date 1139257949 0 # Node ID df0b0745708370e2e04531c3ed6582dab9bc3d0c # Parent f1ace6d02a322e49d7c5922f4bd6f89101904062 Bug fix diff -r f1ace6d02a32 -r df0b07457083 lemon/sub_graph.h --- a/lemon/sub_graph.h Mon Feb 06 17:00:41 2006 +0000 +++ b/lemon/sub_graph.h Mon Feb 06 20:32:29 2006 +0000 @@ -275,6 +275,7 @@ Parent::operator[](node).firstIn = INVALID; Parent::operator[](node).firstOut = INVALID; } + virtual void add(const std::vector& nodes) { Parent::add(nodes); for (int i = 0; i < (int)nodes.size(); ++i) { @@ -356,7 +357,7 @@ for (int i = 0; i < (int)edges.size(); ++i) { adaptor.hide(edges[i]); } - Parent::erase(edge); + Parent::erase(edges); } private: @@ -586,6 +587,14 @@ Parent::operator[](node).firstOut = INVALID; } + virtual void add(const std::vector& nodes) { + Parent::add(nodes); + for (int i = 0; i < (int)nodes.size(); ++i) { + Parent::operator[](nodes[i]).firstIn = INVALID; + Parent::operator[](nodes[i]).firstOut = INVALID; + } + } + private: SubGraph& adaptor; }; @@ -646,7 +655,7 @@ for (int i = 0; i < (int)edges.size(); ++i) { adaptor.hide(edges[i]); } - Parent::erase(edge); + Parent::erase(edges); } private: