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 <ti...@skewed.de>
_______________________________________________
graph-tool mailing list -- graph-tool@skewed.de
To unsubscribe send an email to graph-tool-le...@skewed.de