public class Leung extends EpidemicCommunityAlgorithm
Modifier and Type | Field and Description |
---|---|
protected double |
delta
Hop attenuation factor
|
protected double |
m
Comparable node characteristic preference exponent
|
protected String |
weightMarker
Name of the marker that is used to store weight of links on the graph
that this algorithm is applied to.
|
communityScores
graph, graphChanged, marker, nonUniqueMarker, rng, staticMode
Constructor and Description |
---|
Leung() |
Leung(Graph graph) |
Leung(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(Graph graph,
String marker) |
Leung(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(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(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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
communityScores(Node u)
Compute the scores for all relevant communities for the selected node
using Leung algorithm.
|
void |
computeNode(Node node)
Perform computation of one iteration of the algorithm on a given node
using the epidemic label propagation algorithm.
|
protected void |
originateCommunity(Node node)
Generate a new original community and attribute it to a node
|
void |
setParameters(double m,
double delta)
Sets the preference exponent and hop attenuation factor to the given
values.
|
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, updateDisplayClass
protected String weightMarker
protected double m
protected double delta
public Leung()
public Leung(Graph graph, String marker, String weightMarker)
graph
- graph to which the algorithm will be appliedmarker
- community attribute markerweightMarker
- edge weight markerpublic Leung(Graph graph, double m, double delta)
graph
- graph to which the algorithm will be appliedm
- comparable function preference exponent valuedelta
- hop attenuation factor valuepublic Leung(Graph graph, String marker, double m, double delta)
graph
- graph to which the algorithm will be appliedmarker
- community attribute markerm
- comparable function preference exponent valuedelta
- hop attenuation factor valuepublic Leung(Graph graph, String marker, String weightMarker, double m, double delta)
graph
- graph to which the algorithm will be appliedmarker
- community attribute markerweightMarker
- edge weight markerm
- comparable function preference exponent valuedelta
- hop attenuation factor valuepublic void setParameters(double m, double delta)
m
- comparable function preference exponent valuedelta
- hop attenuation factor valuepublic void computeNode(Node node)
EpidemicCommunityAlgorithm
computeNode
in class EpidemicCommunityAlgorithm
protected void communityScores(Node u)
communityScores
in class EpidemicCommunityAlgorithm
u
- The node for which the scores computation is performedprotected void originateCommunity(Node node)
DecentralizedCommunityAlgorithm
originateCommunity
in class EpidemicCommunityAlgorithm
node
- The node that will originate the new communityWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses