/** * Creates a new instance of a partitional cluster given a first data point. * * @param dp The first data point that will become a member of this cluster. */ public PartitionalCluster(DataPoint dp) { dpoints_ = new ArrayList<DataPoint>(); dpoints_.add(dp); changed_ = false; super.setCentroid(dp.getVector().clone()); }
/** * Creates a new PartitionalCluster instance given an initial centroid. * * @param centroid The initial centroid for this cluster. */ public PartitionalCluster(float[] centroid) { dpoints_ = new ArrayList<DataPoint>(); changed_ = false; super.setCentroid(centroid.clone()); }