Returns the set of nodes in the component of graph containing node n.
G (NetworkX Graph) – An undirected graph.
n (node label) – A node in G
comp – A set of nodes in the component of G containing node n.
- Return type
NetworkXNotImplemented – If G is directed.
For undirected graphs only.