sonarfix: Do not use changes as a loop counter

This commit is contained in:
aherbert 2022-10-13 17:39:41 +01:00
parent f916fba364
commit 5f3af10635
1 changed files with 3 additions and 2 deletions

View File

@ -133,9 +133,10 @@ public class ElkanKMeansPlusPlusClusterer<T extends Clusterable>
final double[] deltas = new double[k];
VectorialMean[] means = new VectorialMean[k];
for (int it = 0, changes = 0, max = getMaxIterations();
for (int it = 0, max = getMaxIterations();
it < max;
it++, changes = 0) {
it++) {
int changes = 0;
// Step I.
// Compute inter-cluster distances.
updateIntraCentersDistances(centers, dcc, s);