I can't think of a good reason not to do this, but I've not been in that code for a while. If you make that change, do all of the unit tests still run? Can you write another test that uses DenseVectors? If yes, then please submit a JIRA patch.
Jeff On Nov 3, 2013, at 1:30 PM, "DeBarr, Dave" <[email protected]> wrote: > Hi, > > Curiosity question: why not use point.clone() in the constructor for > org.apache.mahout.clustering.AbstractCluster()? > > This would allow the use of DenseVector, which is much faster (no dictionary > lookups) when clustering dense SIFT descriptors to form visual words (instead > of sparse document vectors). > > Thanks, > Dave > > protected AbstractCluster(Vector point, int id2) { > setNumObservations(0); > setTotalObservations(0); > //setCenter(new RandomAccessSparseVector(point)); > setCenter(point.clone()); > setRadius(center.like()); > setS0(0); > setS1(center.like()); > setS2(center.like()); > this.id = id2; > } > >
