Hello,
I am new to igraph, so I might be getting something wrong. I am using
igraph 0.6.5 with python3.
I have a graph and want to calculate the shortest paths between all
pairs of nodes:
>>> graph.is_directed()
False
>>> graph.get_edgelist()
[(0, 1), (1, 2), (2, 3)]
>>> for source, target in combinations(graph.vs, 2):
... graph.get_shortest_paths(source, target)[0]
[0, 1]
[0, 1, 2]
[0, 2, 3]
[1, 2]
[1, 0, 3]
[2, 3]
What bothers me: The paths [0, 2, 3] and [1, 0, 3] seem to be invalid.
There should be no edge 0 -- 2 or 0 -- 3.
Any hints?
Regards,
Frederik
_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help