Removing vertex doesn't remove its edges

Hello Tiago,

I think I am missing something very simple:

import graph_tool.all as gt
g = gt.Graph(directed = False)
g.add_edge_list([(0, 1), (1, 2)])

print(g)
g.remove_vertex(1)
print(g)

The two print commands give this:
<Graph object, undirected, with 3 vertices and 2 edges at 0x7fc489423780>
<Graph object, undirected, with 2 vertices and 2 edges at 0x7fc489423780>

Shouldn't it show 0 edges after removal of the middle vertex? When I draw
these graphs, I see no edges after removal. Also, would this affect other
calculations like shortest paths etc?

Thank you
Snehal

attachment.html (909 Bytes)

There was a simple bug that did not update the edge counter properly; but
this was already fixed. What version are you using?

And no, this does not affect any of the algorithms.

Best,
Tiago

I am using 2.22 (commit 44bf2b92, Thu Mar 2 23:08:39 2017 +0000).

Anyway, if it doesn't affect the graph algorithms, that is fine with me.

Thank you

attachment.html (1.68 KB)