File size: 392 Bytes
e789b06 |
1 2 3 4 5 6 7 8 9 10 11 12 |
TDAT: private void updateNearestNeighbours() { for (List<V> nn : nearestNeighbours) { nn.clear(); } for (int i = 0; i < nearestCentroid.length; ++i) { int nearest = nearestCentroid[i]; nearestNeighbours.get(nearest).add(vectors.get(i)); } } COM: <s> pre nearest centroid has been updated with nearest indexes </s> |