All Implemented Interfaces:
Algorithm, DynamicAlgorithm, org.graphstream.stream.AttributeSink, org.graphstream.stream.ElementSink, org.graphstream.stream.Sink

public class Leung
extends EpidemicCommunityAlgorithm
This class implements an improved community detection algorithm based on the epidemic label propagation paradigm the was presented by Leung et al.
Author:
Guillaume-Jean Herbiet
Scientific Reference :
I. X. Y. Leung, P. Hui, P. Lio`, and J. Crowcroft, “Towards Real- Time Community Detection in Large Networks,” Physical Review E (Statistical, Nonlinear, and Soft Matter Physics), vol. 79, no. 6, pp. 066 107+, 2009.
  • Constructor Details

    • Leung

      public Leung()
    • Leung

      public Leung​(org.graphstream.graph.Graph graph)
    • Leung

      public Leung​(org.graphstream.graph.Graph graph, String marker)
    • Leung

      public Leung​(org.graphstream.graph.Graph graph, String marker, String weightMarker)
      Create a new Leung algorithm instance, attached to the specified graph, using the specified marker to store the community attribute, and the specified weightMarker to retrieve the weight attribute of graph edges.
      Parameters:
      graph - graph to which the algorithm will be applied
      marker - community attribute marker
      weightMarker - edge weight marker
    • Leung

      public Leung​(org.graphstream.graph.Graph graph, double m, double delta)
      Create a new Leung algorithm instance, attached to the specified graph, using the default markers for the node community and edge weight attributes. Sets the preference exponent and hop attenuation factor to the given values.
      Parameters:
      graph - graph to which the algorithm will be applied
      m - comparable function preference exponent value
      delta - hop attenuation factor value
    • Leung

      public Leung​(org.graphstream.graph.Graph graph, String marker, double m, double delta)
      Create a new Leung algorithm instance, attached to the specified graph, using the specified marker to store the community attribute, and the default marker to retrieve the weight attribute of graph edges. Sets the preference exponent and hop attenuation factor to the given values.
      Parameters:
      graph - graph to which the algorithm will be applied
      marker - community attribute marker
      m - comparable function preference exponent value
      delta - hop attenuation factor value
    • Leung

      public Leung​(org.graphstream.graph.Graph graph, String marker, String weightMarker, double m, double delta)
      Create a new Leung algorithm instance, attached to the specified graph, using the specified marker to store the community attribute, and the specified weightMarker to retrieve the weight attribute of graph edges. Sets the preference exponent and hop attenuation factor to the given values.
      Parameters:
      graph - graph to which the algorithm will be applied
      marker - community attribute marker
      weightMarker - edge weight marker
      m - comparable function preference exponent value
      delta - hop attenuation factor value
  • Method Details

    • setParameters

      public void setParameters​(double m, double delta)
      Sets the preference exponent and hop attenuation factor to the given values.
      Parameters:
      m - comparable function preference exponent value
      delta - hop attenuation factor value
    • computeNode

      public void computeNode​(org.graphstream.graph.Node node)
      Description copied from class: EpidemicCommunityAlgorithm
      Perform computation of one iteration of the algorithm on a given node using the epidemic label propagation algorithm.
      Overrides:
      computeNode in class EpidemicCommunityAlgorithm
      Parameters:
      node - node to compute