0

Is there a way to find paths between two vertices in a graph of a specific length?

I know I can find the shortest path using:

graph_tool.topology.all_shortest_paths

and that I can find paths of a maximum length using:

graph_tool.topology.all_paths

But is there a way to constrain these to find paths of a specific length, or at least paths between an upper and lower bound length?

1 Answers1

1

This is not directly implemented, but by using all_paths() you can simply ignore the paths that do not have the length you want.

Tiago Peixoto
  • 5,149
  • 2
  • 28
  • 28