|
||||||||||
| 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.graph.LabelVertex
public final class LabelVertex
Vertices for a Label Propagation Algorithm graph. Labels change as we iterate through the algorithm, and once the algorithm has converged after several iterations, vertices with the same label are in the same cluster.
We are using the identity's hash code for the label for faster comparisons. This has some risk of us clustering identities that actually are not related, because hash codes are not guaranteed to be unique.
| Constructor Summary | |
|---|---|
LabelVertex(Identity id)
Constructs a new vertex representing the given id and
initializes the label information to the hashcode of the id. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
|
Identity |
getIdentity()
Returns the identity this vertex represents. |
int |
getLabel()
Returns the current label for this vertex. |
int |
hashCode()
|
void |
initializeLabel()
Sets the label to the initial value. |
void |
setLabel(int newLabel)
Sets the label to a new value. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LabelVertex(Identity id)
id and
initializes the label information to the hashcode of the id.
id - the identity this vertex represents| Method Detail |
|---|
public void initializeLabel()
public boolean equals(Object o)
We do no take the current label into account when calculating equals.
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic void setLabel(int newLabel)
newLabel - the new label valuepublic int getLabel()
public Identity getIdentity()
|
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 | |||||||||