org.graphstream.algorithm.community
Class Leung

java.lang.Object
  extended by org.graphstream.algorithm.community.DecentralizedCommunityAlgorithm
      extended by org.graphstream.algorithm.community.EpidemicCommunityAlgorithm
          extended by org.graphstream.algorithm.community.Leung
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 Summary
Leung()
           
Leung(org.graphstream.graph.Graph graph)
           
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.
Leung(org.graphstream.graph.Graph graph, String marker)
           
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.
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.
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.
 
Method Summary
 void computeNode(org.graphstream.graph.Node node)
          Perform computation of one iteration of the algorithm on a given node using the epidemic label propagation algorithm.
 void setParameters(double m, double delta)
          Sets the preference exponent and hop attenuation factor to the given values.
 
Methods inherited from class org.graphstream.algorithm.community.DecentralizedCommunityAlgorithm
attributeChanged, compute, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, getMarker, getRandom, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, init, init, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved, setMarker, setRandom, staticMode, stepBegins, terminate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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


Copyright © 2011. All Rights Reserved.