This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.
- descendants(graph, node, /)#
Return the descendants of a node in a graph.
This differs from
PyDiGraph.successors()method in that
successors`returns only nodes with a direct edge out of the provided node. While this function returns all nodes that have a path from the provided node.
graph (PyDiGraph) – The graph to get the descendants from
node (int) – The index of the graph node to get the descendants for
A set of node indices of descendants of provided node.
- Return type: