90919293949596979899100
HashSparseVector c = centroid; for (int i = 0; i < docs.size(); ++i) { Instance doc = docs.get(i); quality += c.distanceEuclidean((HashSparseVector) doc.getData()); } return quality; }