24 Sep
2018
24 Sep
'18
7:57 a.m.
Am 23.09.18 um 18:18 schrieb Ozgun Altunkaya:
Hello,
I was wondering if there's a equivalent to NetworkX's has_path function. I'd like to check if there is a path between two given vertexes, and if there is, then return True. This can be done in NetworkX with has_path. I think this is doable in graph-tool with StopSearch method, but I couldn't figure out a way to implement it. Any help is appreciated.
This is trivial, just do: has_path = shortest_distance(g, u, v) < g.num_vertices() Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>