22 Feb
2022
22 Feb
'22
2:08 p.m.
Am 22.02.22 um 15:02 schrieb RAFAEL SERAPILHA DURELLI:
Ok Tiago thanks.
My question is, given a source node how can I get all ancestors? I tried to use all_predecessors but I dunno what is dist_map and prep_map.
The documentation says: dist_map : :class:`~graph_tool.VertexPropertyMap` Vertex property map with the distances from ``source`` to all other vertices. pred_map : :class:`~graph_tool.VertexPropertyMap` Vertex property map with the predecessors in the search tree. You can determine these values using the function shortest_distance(): dist_map, pred_map = shortest_distance(g, source=u, pred_map=True) -- Tiago de Paula Peixoto <tiago@skewed.de>