public class Modularity extends CommunityMeasure
| 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.
|
edgeAdded, edgeRemoved, getLastComputedValue, getMeasure, graphCleared, init, nodeAdded, nodeAttributeAdded, nodeAttributeChanged, nodeRemoved, terminatepublic 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()
AlgorithmAlgorithm.init(Graph) method has to be called
before computing.compute in interface Algorithmcompute in class CommunityMeasureAlgorithm.init(Graph)Copyright © 2015. All rights reserved.