It's because the graph definition in graph tool by default is directed. Declare your graph as myGraph = Graph (directed=False) On Mon, Jan 7, 2019, 23:49 Christopher Morris < christopher.morris@tu-dortmund.de wrote:
Given an *undirected* graph g with four vertices, I add edges by
g.add_edge_list([(0, 1), (0, 2), (0, 3), (1, 0), (1, 2), (1, 3), (2, 0), (2, 1), (2, 3), (3, 0), (3, 1), (3, 2)]) .
When calling g.num_edges() the result is 12. In my opinion it should be 6, as the graph is undirected? Any ideas?
-- Christopher Morris Algorithm Engineering, Department of Computer Science, TU Dortmund University
https://ls11-www.cs.tu-dortmund.de/staff/morris
_______________________________________________ graph-tool mailing list graph-tool@skewed.de https://lists.skewed.de/mailman/listinfo/graph-tool