Returns induced subgraph of neighbors centered at node n within a given radius.
Parameters : | G : graph
n : node
radius : number, optional
center : bool, optional
undirected : bool, optional
distance : key, optional
|
---|
Notes
For directed graphs D this produces the “out” neighborhood or successors. If you want the neighborhood of predecessors first reverse the graph with D.reverse(). If you want both directions use the keyword argument undirected=True.
Node, edge, and graph attributes are copied to the returned subgraph.