Subject: | delete_vertex |
Hi Jarkko,
I do not know if this is a bug or a feature, but in presence of
vertex attributes, the graph after delete_vertex($v) still has $v
in the list of vertices. Here is an example exibiting this behaviour.
use Graph::Undirected;
my $G = Graph::Undirected->new;
$G->add_vertex('a');
$G->set_vertex_attribute('a', 'sim', 0);
$G->add_vertex('b');
$G->set_vertex_attribute('b', 'sim', 1);
$G->add_edge('a', 'b');
$G->delete_vertex('a');
print "G has vertex a ", $G->has_vertex('a') ? 1 : 0, "\n";
print "G vertices are: ", join " ", $G->vertices, "\n";
This prints out:
G has vertex a 0
G vertices are: b a
Best regards,
Macha Nikolski