networkx.algorithms.traversal.breadth_first_search.descendants_at_distance¶
-
descendants_at_distance
(G, source, distance)[source]¶ Returns all nodes at a fixed
distance
fromsource
inG
.- Parameters
G (NetworkX DiGraph) – A directed graph
source (node in
G
)distance (the distance of the wanted nodes from
source
)
- Returns
The descendants of
source
inG
at the givendistance
fromsource
- Return type
set()