Class Louvain<U extends java.io.Serializable>
java.lang.Object
es.uam.eps.ir.relison.sna.community.detection.modularity.Louvain<U>
- Type Parameters:
U
- Type of the users.
- All Implemented Interfaces:
CommunityDetectionAlgorithm<U>
public class Louvain<U extends java.io.Serializable> extends java.lang.Object implements CommunityDetectionAlgorithm<U>
Class for computing the Louvain community detection algorithm.
Reference: V. Blondel, J. Guillaume, R. Lambiotte, E. Lefebvre, Fast unfolding of communities in large networks. Journal of Statistical Mechanics 10 (2008)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Communities<U>
detectCommunities(Graph<U> graph)
Computes the communities for a certain graph.
-
Field Details
-
Constructor Details
-
Louvain
public Louvain(int rngSeed, double threshold)Constructor.- Parameters:
rngSeed
- random number generator seed.threshold
- the minimum variation for another round in phase 1.
-
Louvain
public Louvain(double threshold)Constructor.- Parameters:
threshold
- the minimum variation for another round in phase 1.
-
-
Method Details
-
detectCommunities
Description copied from interface:CommunityDetectionAlgorithm
Computes the communities for a certain graph.- Specified by:
detectCommunities
in interfaceCommunityDetectionAlgorithm<U extends java.io.Serializable>
- Parameters:
graph
- The full graph.- Returns:
- The communities if everything went OK, null if not.
-