Classes related to graph clustering.
Function | _biconnected |
Calculates the biconnected components of the graph. |
Function | _clusters |
Deprecated alias to Graph.connected_components() . |
Function | _cohesive |
Calculates the cohesive block structure of the graph. |
Function | _connected |
Calculates the (strong or weak) connected components for a given graph. |
Function | _handle |
Handles the mark_groups=... keyword argument in plotting methods of clusterings. |
Function | _prepare |
Auxiliary method that takes two community structures either as membership lists or instances of Clustering , and returns a tuple whose two elements are membership lists. |
Calculates the biconnected components of the graph.
Parameters | |
graph | Undocumented |
return | whether to return the articulation points as well |
Returns | |
a VertexCover object describing the biconnected components, and optionally the list of articulation points as well |
Calculates the cohesive block structure of the graph.
Cohesive blocking is a method of determining hierarchical subsets of graph vertices based on their structural cohesion (i.e. vertex connectivity). For a given graph G, a subset of its vertices S is said to be maximally k-cohesive if there is no superset of S with vertex connectivity greater than or equal to k. Cohesive blocking is a process through which, given a k-cohesive set of vertices, maximally l-cohesive subsets are recursively identified with l > k. Thus a hierarchy of vertex subsets is obtained in the end, with the entire graph G at its root.
Returns | |
an instance of CohesiveBlocks . See the documentation of CohesiveBlocks for more information. | |
See Also | |
CohesiveBlocks |
Calculates the (strong or weak) connected components for a given graph.
Parameters | |
graph | Undocumented |
mode | must be either "strong" or "weak", depending on the connected components being sought. Optional, defaults to "strong". |
Returns | |
a VertexClustering object |
Handles the mark_groups=... keyword argument in plotting methods of clusterings.
This is an internal method, you shouldn't need to mess around with it. Its purpose is to handle the extended semantics of the mark_groups=... keyword argument in the __plot__ method of VertexClustering
and VertexCover
instances, namely the feature that numeric IDs are resolved to clusters automatically.
Auxiliary method that takes two community structures either as membership lists or instances of Clustering
, and returns a tuple whose two elements are membership lists.
This is used by compare_communities
and split_join_distance
.
Parameters | |
comm1 | the first community structure as a membership list or as a Clustering object. |
comm2 | the second community structure as a membership list or as a Clustering object. |
remove | whether to remove None entries from the membership lists. If remove_none is False, a None entry in either comm1 or comm2 will result in an exception. If remove_none is True, None values are filtered away and only the remaining lists are compared. |