|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectdbStat.Cluster
Cluster class that clusters all proximal vectors.
The collection of vectors is a unique set of attribute vectors that have been associated with the centroid vector of this cluster.
| Field Summary | |
private AttributeVector |
centroid
an AttributeVector that represents the center of the cluster |
private int |
identity
an integer to track and identify this unique cluster |
private java.util.ArrayList |
vectorList
the list of AttributeVectors in the cluster |
| Constructor Summary | |
Cluster(AttributeVector firstVector)
Constructor for the class creates a cluster with its first vector and sets this first vector as its centroid |
|
| Method Summary | |
void |
addAttributeVector(AttributeVector attVector)
Add a new vector to the cluster if it doesn't already exist in the cluster |
void |
calculateCentroid()
Method to calculate the centroid for the cluster |
AttributeVector |
getCentroid()
Gets the centroid vector for this cluster |
int |
getClusterSize()
Gets the number of vectors this cluster contains |
AttributeVector |
getVectorByIndex(int index)
Gets the attribute vector located at the specified index |
void |
removeAttributeVector(java.lang.String vectorID)
Removes a given AttributeVector from the cluster |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int identity
private java.util.ArrayList vectorList
private AttributeVector centroid
| Constructor Detail |
public Cluster(AttributeVector firstVector)
| Method Detail |
public void addAttributeVector(AttributeVector attVector)
attVector - New AttributeVector to be addedpublic void removeAttributeVector(java.lang.String vectorID)
vectorID - Identity of the vector to be removedpublic void calculateCentroid()
public AttributeVector getCentroid()
public int getClusterSize()
public AttributeVector getVectorByIndex(int index)
index - the index to retrieve
public java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||