For using igraph from Python
Home  Trees  Indices  Help 



object +  Clustering +  VertexClustering
The clustering of the vertex set of a graph.
This class extends Clustering by linking it to a specific Graph object and by optionally storing the modularity score of the clustering. It also provides some handy methods like getting the subgraph corresponding to a cluster and such.
Note:
since this class is linked to a Graph, destroying the graph by the
del
operator does not free the memory occupied by the
graph if there exists a VertexClustering that references the Graph.






















Inherited from Inherited from 





_default_palette = None hash(x) 


modularity Returns the modularity score 

q Returns the modularity score 

graph Returns the graph belonging to this object 

Inherited from Inherited from 

Creates a clustering object for a given graph.

Creates a vertex clustering based on the value of a vertex attribute. Vertices having the same attribute will correspond to the same cluster.

Returns a VertexCover that contains the same clusters as this clustering.

Returns a graph where each cluster is contracted into a single vertex. In the resulting graph, vertex i represents cluster i in this clustering. Vertex i and j will be connected if there was at least one connected vertex pair (a, b) in the original graph such that vertex a was in cluster i and vertex b was in cluster j.

Recalculates the stored modularity value. This method must be called before querying the modularity score of the
clustering through the class member

Recalculates the stored modularity value and swallows all exceptions raised by the modularity function (if any).

Get the subgraph belonging to a given cluster.
Precondition: the vertex set of the graph hasn't been modified since the moment the clustering was constructed. 
Gets all the subgraphs belonging to each of the clusters.
Precondition: the vertex set of the graph hasn't been modified since the moment the clustering was constructed. 
Returns the giant community of the clustered graph. The giant component a community for which no larger community exists.
Note: there can be multiple giant communities, this method will return the copy of an arbitrary one if there are multiple giant communities. Precondition: the vertex set of the graph hasn't been modified since the moment the clustering was constructed. 
Plots the clustering to the given Cairo context in the given bounding box. This is done by calling Graph.__plot__() with the same arguments, but coloring
the graph vertices according to the current clustering (unless overridden
by the This method understands all the positional and keyword arguments that are understood by Graph.__plot__(), only the differences will be highlighted here:
See Also: Graph.__plot__() for more supported keyword arguments. 

modularityReturns the modularity score

qReturns the modularity score

graphReturns the graph belonging to this object

Home  Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Fri May 10 10:51:14 2019  http://epydoc.sourceforge.net 