graph_tool.topology.shortest_distance with disconnected graphs
2 Oct
2015
2 Oct
'15
10:06 a.m.
|Hi,| || |how does dist_map of graph_tool.topology.shortest_distance indicate that two vertices are not connected. Is the value simply set to 2147483647?| || |Best regards,| |Christopher| ||| |
2 Oct
2 Oct
10:13 a.m.
New subject: graph_tool.topology.shortest_distance with disconnected graphs
On 02.10.2015 12:06, Christopher Morris wrote:
how does dist_map of graph_tool.topology.shortest_distance indicate that two vertices are not connected. Is the value simply set to 2147483647?
Yes. More precisely, it is set to the largest possible "int32". A simple check to test if two vertices are unreachable is: shortest_distance(g, u, v) >= g.num_vertices() Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>
3729
Age (days ago)
3729
Last active (days ago)
1 comments
2 participants
participants (2)
-
Christopher Morris -
Tiago de Paula Peixoto