NetworkX

Previous topic

connected_component_subgraphs

Next topic

is_strongly_connected

node_connected_component

node_connected_component(G, n)[source]

Return nodes in connected components of graph containing node n.

Parameters :

G : NetworkX Graph

An undirected graph.

n : node label

A node in G

Returns :

comp : lists

A list of nodes in component of G containing node n.

Notes

For undirected graphs only.