netkit.util
Class ModularityClusterer
java.lang.Object
netkit.util.ModularityClusterer
public final class ModularityClusterer
- extends java.lang.Object
Modularity-based clusterer, extended to work with weights, multiple edges,
and directed edges.
Self-loops are ignored. All edges are directed. For bidirectional edges,
use two opposite edges with equal weights.
- Author:
- Evan Gamble (egamble@fetch.com), Sofus A. Macskassy (sofmac@gmail.com)
- See Also:
Clauset, M. Newman and C. Moore, "Finding community structure in
very large networks."
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModularityClusterer
public ModularityClusterer(Graph g)
startClustering
public void startClustering()
getIsolatedClusters
public java.util.Set<ModularityClusterer.Cluster> getIsolatedClusters()
getIsolatedClusterNodeSets
public java.util.List<java.util.Set<Node>> getIsolatedClusterNodeSets()
getConnectedClusters
public java.util.Set<ModularityClusterer.Cluster> getConnectedClusters()
getConnectedClusterNodeSets
public java.util.List<java.util.Set<Node>> getConnectedClusterNodeSets()
getNumConnectedClusters
public int getNumConnectedClusters()
getNumIsolatedClusters
public int getNumIsolatedClusters()
getNumClusterNodes
public int getNumClusterNodes()
getNumSingletons
public int getNumSingletons()
getGraph
public Graph getGraph()
percentDone
public double percentDone()
isActive
public boolean isActive()
stop
public void stop()
buildNodeCluster
public static void buildNodeCluster(java.util.Set<Node> nodeCluster,
ModularityClusterer.Cluster c)
main
public static void main(java.lang.String[] args)
throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException