iduedu.keep_largest_nx_component

iduedu.keep_largest_nx_component(graph, copy=True)[source]

Keep only the largest connected component of a NetworkX graph.

For directed graphs, weak connectivity is used. For undirected graphs, ordinary connectivity is used.

Return type:

Graph

Parameters: