P-M
P-M

Reputation: 1399

Find k shortest paths with graph-tool

I have a directed graph for which I am trying to find the top k shortest paths. At the moment I have implemented the network in graph-tool which provides a shortest path algorithm but no k shortest paths algorithm by what I can tell. I have come across this post (All shortest paths using graph_tool) but I am not after all paths connecting two nodes.

It seems as if NetworkX has a function implemented for this (https://networkx.readthedocs.org/en/stable/reference/generated/networkx.algorithms.shortest_paths.generic.all_shortest_paths.html?highlight=all_shortest_paths). Is there a way to somehow do this in graph-tool too or am I better off switching toolboxes and using NetworkX?

Upvotes: 2

Views: 1445

Answers (1)

Related Questions