|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.nodemap.affinity.BasicState
com.sun.sgs.impl.service.nodemap.affinity.AbstractLPA
com.sun.sgs.impl.service.nodemap.affinity.single.SingleLabelPropagation
public class SingleLabelPropagation
A single-node implementation of the algorithm presented in "Near linear time algorithm to detect community structures in large-scale networks" Raghavan, Albert and Kumara 2007.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
BasicState.State |
| Field Summary |
|---|
| Fields inherited from class com.sun.sgs.impl.service.nodemap.affinity.AbstractLPA |
|---|
DEFAULT_NUM_THREADS, executor, graph, iterations, localNodeId, logger, NUM_THREADS_PROPERTY, numThreads, PROP_NAME, ran, vertices |
| Fields inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
state |
| Constructor Summary | |
|---|---|
SingleLabelPropagation(AffinityGraphBuilder builder,
ProfileCollector col,
Properties properties)
Constructs a new instance of the label propagation algorithm. |
|
SingleLabelPropagation(AffinityGraphBuilder builder,
ProfileCollector col,
Properties properties,
AffinityGroupFinderStats stats)
Constructs a new instance of the label propagation algorithm. |
|
| Method Summary | |
|---|---|
void |
disable()
Disables the finder. |
protected void |
doOtherInitialization()
Perform any algorithm specific initialization for an algorithm run. |
protected long |
doOtherNeighbors(LabelVertex vertex,
Map<Integer,Long> labelMap,
StringBuilder logSB)
Update the label map with any other neighbors known to a particular algorithm. |
void |
enable()
Enables the finder. |
NavigableSet<RelocatingAffinityGroup> |
findAffinityGroups()
Finds affinity groups across all nodes in the Darkstar cluster. |
void |
shutdown()
Shuts down the finder. |
| Methods inherited from class com.sun.sgs.impl.service.nodemap.affinity.AbstractLPA |
|---|
gatherGroups, initializeLPARun, setMostFrequentLabel |
| Methods inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
checkForDisabledOrShutdownState, checkForShutdownState, setDisabledState, setEnabledState, setShutdownState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleLabelPropagation(AffinityGraphBuilder builder,
ProfileCollector col,
Properties properties)
throws Exception
builder - the graph producercol - the profile collectorproperties - the properties for configuring this service
IllegalArgumentException - if numThreads is
less than 1
Exception - if any other error occurs
public SingleLabelPropagation(AffinityGraphBuilder builder,
ProfileCollector col,
Properties properties,
AffinityGroupFinderStats stats)
throws Exception
builder - the graph producercol - the profile collectorproperties - the properties for configuring this servicestats - pre-constructed JMX Mbean or null if one should be
constructed
IllegalArgumentException - if numThreads is
less than 1
Exception - if any other error occurs| Method Detail |
|---|
protected void doOtherInitialization()
doOtherInitialization in class AbstractLPA
protected long doOtherNeighbors(LabelVertex vertex,
Map<Integer,Long> labelMap,
StringBuilder logSB)
doOtherNeighbors in class AbstractLPAvertex - the vertex whose neighbors labels will be examinedlabelMap - a map of labels to counts of neighbors using that labellogSB - a StringBuilder for gathering log info about neighbors
-1L if there are no other neighbors.public void disable()
disable in interface AffinityGroupFinderpublic void enable()
enable in interface AffinityGroupFinderpublic void shutdown()
shutdown in interface AffinityGroupFinder
public NavigableSet<RelocatingAffinityGroup> findAffinityGroups()
throws AffinityGroupFinderFailedException
AffinityGroupFinderFailedException
is thrown. Errors include nodes not responding to server requests.
Find the communities, using a graph obtained from the graph builder provided at construction time. The communities are found using the label propagation algorithm.
This algorithm will not modify the graph by adding or removing vertices or edges, but it will modify the labels in the vertices.
This implementation is for graphs on a single node only, and is useful for testing algorithm optimizations. Finding affinity groups on a single node is, in general, not useful (the affinity groups are used for load balancing, and no load balancing is required on a single node).
findAffinityGroups in interface LPAAffinityGroupFinderAffinityGroupFinderFailedException - if there is an error
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||