java.lang.Object
es.uam.eps.ir.relison.sna.community.detection.modularity.LabelPropagation<U>
Type Parameters:
U - type of the users.
All Implemented Interfaces:
CommunityDetectionAlgorithm<U>

public class LabelPropagation<U>
extends java.lang.Object
implements CommunityDetectionAlgorithm<U>
Implementation of the label propagation algorithm. This community detection approach starts with all nodes having different communities, and ends when each nodes shares the same label that the majority of his neighbors.

Reference: U.N. Raghavan, R. Albert, S. Kumara. Near linear time algorithm to detect communities in large-scale networks. Physical Review E 76: 036106 (2007).

  • Field Summary

    Fields 
    Modifier and Type Field Description
    private int rngSeed
    The seed for a random number generator.
  • Constructor Summary

    Constructors 
    Constructor Description
    LabelPropagation()
    Constructor.
    LabelPropagation​(int rngSeed)
    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