MeowBlingBling
MeowBlingBling

Reputation: 147

networkX equivalent to igraph vertexClustering

python's igraph has a function clusters() that allows you to turn a Graph into a vertexClustering via

igraph.Graph().clusters(mode ='STRONG')

This allows me to take a graph and come up with a list of all nodes that are connected together. My question is, does networkX have an equivalent?

Upvotes: 0

Views: 313

Answers (1)

Joel
Joel

Reputation: 23827

I believe that your question is about finding strongly connected components in directed graphs (because of the term strong).

You should look at strongly_connected_components

If you are just looking at undirected graphs, then connected_components should help. This returns a generator of sets of nodes.

Upvotes: 1

Related Questions