}
for (int i = 0; i < searcher.size(); ++i) {
summarizers.add(new OnlineSummarizer());
}
for (Vector v : datapoints) {
Centroid closest = (Centroid)searcher.search(v, 1).get(0).getValue();
OnlineSummarizer summarizer = summarizers.get(closest.getIndex());
summarizer.add(distanceMeasure.distance(v, closest));
}
return summarizers;
}