sonarfix: Do not use changes as a loop counter
This commit is contained in:
parent
f916fba364
commit
5f3af10635
|
@ -133,9 +133,10 @@ public class ElkanKMeansPlusPlusClusterer<T extends Clusterable>
|
||||||
|
|
||||||
final double[] deltas = new double[k];
|
final double[] deltas = new double[k];
|
||||||
VectorialMean[] means = new VectorialMean[k];
|
VectorialMean[] means = new VectorialMean[k];
|
||||||
for (int it = 0, changes = 0, max = getMaxIterations();
|
for (int it = 0, max = getMaxIterations();
|
||||||
it < max;
|
it < max;
|
||||||
it++, changes = 0) {
|
it++) {
|
||||||
|
int changes = 0;
|
||||||
// Step I.
|
// Step I.
|
||||||
// Compute inter-cluster distances.
|
// Compute inter-cluster distances.
|
||||||
updateIntraCentersDistances(centers, dcc, s);
|
updateIntraCentersDistances(centers, dcc, s);
|
||||||
|
|
Loading…
Reference in New Issue