Sorry, I forgot the paste the whole stuff: path = [] for item in pairs: vpath, epath = gt.shortest_path(weighted_graph, weighted_graph.vertex(item[0]), weighted_graph.vertex(item[1]), weights=weights, negative_weights=True) temp_path = [int(v) for v in vpath] path.append(temp_path) Alıntı altunkayao@itu.edu.tr:
Hi,
Thanks for the response Tiago!
I also wonder if the performance differences between those two graphs are expected to be much different, i.e., it takes 9 minutes to obtain shortest path between 400,000 pairs in the normal graph, and it takes 52 hours for the weighted one.
Here is how I'm doing it:
path = [] for item in pairs: vpath, epath = gt.shortest_path(weighted_graph, weighted_graph.vertex(item[0]), weighted_graph.vertex(item[1]), weights=weights, negative_weights=True)