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 -- Snehal M. Shekatkar Pune India
On 01.06.2017 09:48, Snehal Shekatkar wrote:
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?
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 -- Tiago de Paula Peixoto <tiago@skewed.de>
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 On Thu, Jun 1, 2017 at 2:22 PM, Tiago de Paula Peixoto <tiago@skewed.de> wrote:
On 01.06.2017 09:48, Snehal Shekatkar wrote:
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?
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
-- Tiago de Paula Peixoto <tiago@skewed.de> _______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool
-- Snehal M. Shekatkar Pune India
participants (2)
-
Snehal Shekatkar -
Tiago de Paula Peixoto