public class Modularity extends CommunityMeasure
Constructor and Description |
---|
Modularity()
New modularity algorithm using the default marker for communities and no
weight on edges.
|
Modularity(java.lang.String marker)
New modularity algorithm with a given marker for communities and no
weight on edges.
|
Modularity(java.lang.String marker,
java.lang.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.
|
java.lang.String |
defaultMessage() |
void |
setWeightMarker(java.lang.String weightMarker)
Enables weighted extension of the modularity using the given weightMarker
for edge weights.
|
edgeAdded, edgeRemoved, getLastComputedValue, getMeasure, graphCleared, init, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeRemoved, terminate
public Modularity()
public Modularity(java.lang.String marker)
marker
- name of the attribute marking the communities.public Modularity(java.lang.String marker, java.lang.String weightMarker)
marker
- name of the attribute marking the communities.weightMarker
- name of the attribute marking the weight of edges.public void setWeightMarker(java.lang.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)
public java.lang.String defaultMessage()