ac.essex.ooechs.kmeans
Class ClusterableObject

java.lang.Object
  extended by ac.essex.ooechs.kmeans.DataPoint

public class ClusterableObject
extends java.lang.Object

This datastructure represents an item of training data in the k means clustering scenario. It consists of a position in n dimensional space and the id of the last centroid it was closest to.


Constructor Summary
ClusterableObject(double[] positionValues)
          Initialises the clusterable object by setting its position in n dimensional space.
 
Method Summary
 Centroid findClosestCentroid(java.util.Vector<Centroid> centroids)
          Finds, from a list of centroids, the centroid that this object is closest to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClusterableObject

public ClusterableObject(double[] positionValues)
Initialises the clusterable object by setting its position in n dimensional space.

Method Detail

findClosestCentroid

public Centroid findClosestCentroid(java.util.Vector<Centroid> centroids)
Finds, from a list of centroids, the centroid that this object is closest to.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object