NetworkX

Previous topic

is_aperiodic

Next topic

descendants

ancestors

static dag.ancestors(G, source)

Return all nodes having a path to source in G.

Parameters :

G : NetworkX DiGraph

source : node in G

Returns :

ancestors : set()

The ancestors of source in G