max_dist option on topology.shortest_distance
Hi Tiago. I'm having a very simple problem with max_dist
:
from graph_tool.all import *
g = Graph()
g.add_vertex(5)
g.add_edge(0,1)
g.add_edge(1,2)
g.add_edge(0,3)
g.add_edge(0,4)
d = graph_tool.topology.shortest_distance(g, source=g.vertex(0), target=g.vertex(2), max_dist=1)
print d
As from the [documentation] (https://graph-tool.skewed.de/static/doc/topology.html?highlight=distance#graph_tool.topology.shortest_distance), since I restricted max_dist
to 1 and distance(0,2) = 2
I expected d
to be calculated as inf
or something really big. However the output is d = 2
, which makes me think either I screwed something up on my understanding or this feature isn't working properly. I'm currently using version 2.22.
Thanks in advance.