public class Modularity extends CommunityMeasure
Modifier and Type | Field and Description |
---|---|
protected String |
weightMarker
Possible weighted extension for the modularity computation
|
communities, graph, graphChanged, M, marker
Constructor and Description |
---|
Modularity()
New modularity algorithm using the default marker for communities and no
weight on edges.
|
Modularity(String marker)
New modularity algorithm with a given marker for communities and no
weight on edges.
|
Modularity(String marker,
String weightMarker)
New weighted modularity algorithm with a given marker for communities and
the given weightMarker for edge weights.
|
Modifier and Type | Method and Description |
---|---|
void |
compute()
Run the algorithm.
|
void |
setWeightMarker(String weightMarker)
Enables weighted extension of the modularity using the given weightMarker
for edge weights.
|
assignNode, edgeAdded, edgeRemoved, getLastComputedValue, getMeasure, graphCleared, init, initialize, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeRemoved, terminate, unassignNode
edgeAttributeAdded, edgeAttributeChanged, edgeAttributeRemoved, graphAttributeAdded, graphAttributeChanged, graphAttributeRemoved, nodeAttributeRemoved, stepBegins
protected String weightMarker
public Modularity()
public Modularity(String marker)
marker
- name of the attribute marking the communities.public Modularity(String marker, String weightMarker)
marker
- name of the attribute marking the communities.weightMarker
- name of the attribute marking the weight of edges.public void setWeightMarker(String weightMarker)
weightMarker
- name of the attribute marking the weight of edges.public void compute()
Algorithm
Algorithm.init(Graph)
method has to be called
before computing.compute
in interface Algorithm
compute
in class CommunityMeasure
Algorithm.init(Graph)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses