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

    Fields 
    Modifier and Type Field Description
    private int rngSeed
    Seed for a random number generator.
    private double threshold
    The minimum variation of modularity for another phase 1 round.
  • Constructor Summary

    Constructors 
    Constructor Description
    Louvain​(double threshold)
    Constructor.
    Louvain​(int rngSeed, double threshold)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    Communities<U> detectCommunities​(Graph<U> graph)
    Computes the communities for a certain graph.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • rngSeed

      private final int rngSeed
      Seed for a random number generator.
    • threshold

      private final double threshold
      The minimum variation of modularity for another phase 1 round.
  • 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