Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

descendants

descendants(G, source)[source]

Return all nodes reachable from \(source\) in G.

Parameters:

G : NetworkX DiGraph

source : node in G

Returns:

des : set()

The descendants of source in G