Class Leung
java.lang.Object
org.graphstream.algorithm.community.DecentralizedCommunityAlgorithm
org.graphstream.algorithm.community.EpidemicCommunityAlgorithm
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
Constructors Constructor Description 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
Modifier and Type Method Description 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, defaultMessage, edgeAdded, edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, edgeRemoved, getMarker, getRandom, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, graphCleared, init, init, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeAttributeRemoved, nodeRemoved, setMarker, setRandom, staticMode, stepBegins, terminate
-
Constructor Details
-
Leung
public Leung() -
Leung
public Leung(org.graphstream.graph.Graph graph) -
Leung
-
Leung
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 appliedmarker
- community attribute markerweightMarker
- 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 appliedm
- comparable function preference exponent valuedelta
- hop attenuation factor value
-
Leung
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 appliedmarker
- community attribute markerm
- comparable function preference exponent valuedelta
- 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 appliedmarker
- community attribute markerweightMarker
- edge weight markerm
- comparable function preference exponent valuedelta
- 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 valuedelta
- 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 classEpidemicCommunityAlgorithm
- Parameters:
node
- node to compute
-