java.lang.Object
org.jgrapht.alg.clustering.GreedyModularityAlgorithm<V,E>
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
ClusteringAlgorithm<V>
The Greedy Modularity algorithm.
The algorithm partitions the vertices of an undirected graph into communities by greedily maximizing the modularity of possible communities. Greedy modularity maximization begins with each node in its own community and repeatedly joins the pair of communities that lead to the largest modularity until no further increase in modularity is possible (a maximum).
The algorithm is due to Clauset, Newman and Moore. It is described in detail in the following paper:
- Clauset, A., Newman, M. E., & Moore, C. “Finding community structure in very large networks.” Physical Review E 70(6), 2004.
- Author:
- Antonia Tsiftsi
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapht.alg.interfaces.ClusteringAlgorithm
ClusteringAlgorithm.Clustering<V>, ClusteringAlgorithm.ClusteringImpl<V> -
Constructor Summary
ConstructorsConstructorDescriptionGreedyModularityAlgorithm(Graph<V, E> graph) Create a new clustering algorithm. -
Method Summary
Modifier and TypeMethodDescriptionComputes a clustering.
-
Constructor Details
-
GreedyModularityAlgorithm
Create a new clustering algorithm.- Parameters:
graph- the graph
-
-
Method Details
-
getClustering
Description copied from interface:ClusteringAlgorithmComputes a clustering.- Specified by:
getClusteringin interfaceClusteringAlgorithm<V>- Returns:
- a clustering
-