I am using igraph (Python) and would like to get all possible paths between two nodes in a directed graph. I am aware of the function get_all_shortest_paths
, wh
There is a function called get_all_simple_paths(v, to=None, mode=OUT)
.
Perhaps when the question was asked this was not a feature, but it does exactly what you asked.
You said:
would like to get all possible paths between two nodes in a directed graph
So, if the graph object is g
, the start node is source_vertex
and the end node is target_vertex
you could obtain all the possible paths with:
g.get_all_simple_paths(source_vertex, target_vertex)
Function documentation in python