Returns induced subgraph of neighbors centered at node n.
Parameters: | G : graph
n : node
radius : integer, optional
center : bool, optional
undirected: bool, 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.