Merge pull request #2026 from pemmanuelviel:giveFurthestPoint
This commit is contained in:
commit
bfb1ba371c
@ -759,10 +759,13 @@ private:
|
|||||||
|
|
||||||
for (int k=0; k<indices_length; ++k) {
|
for (int k=0; k<indices_length; ++k) {
|
||||||
if (belongs_to[k]==j) {
|
if (belongs_to[k]==j) {
|
||||||
belongs_to[k] = i;
|
// for cluster j, we move the furthest element from the center to the empty cluster i
|
||||||
count[j]--;
|
if ( distance_(dataset_[indices[k]], dcenters[j], veclen_) == radiuses[j] ) {
|
||||||
count[i]++;
|
belongs_to[k] = i;
|
||||||
break;
|
count[j]--;
|
||||||
|
count[i]++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
converged = false;
|
converged = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user