diff --git a/typescript/quantize/quantizer_wsmeans.ts b/typescript/quantize/quantizer_wsmeans.ts index b910f6f8..21f3a248 100644 --- a/typescript/quantize/quantizer_wsmeans.ts +++ b/typescript/quantize/quantizer_wsmeans.ts @@ -104,14 +104,6 @@ export class QuantizerWsmeans { clusterIndices.push(Math.floor(Math.random() * clusterCount)); } - const indexMatrix = new Array(); - for (let i = 0; i < clusterCount; i++) { - indexMatrix.push(new Array()); - for (let j = 0; j < clusterCount; j++) { - indexMatrix[i].push(0); - } - } - const distanceToIndexMatrix = new Array(); for (let i = 0; i < clusterCount; i++) { distanceToIndexMatrix.push(new Array()); @@ -134,10 +126,6 @@ export class QuantizerWsmeans { distanceToIndexMatrix[i][j].distance = distance; distanceToIndexMatrix[i][j].index = j; } - distanceToIndexMatrix[i].sort(); - for (let j = 0; j < clusterCount; j++) { - indexMatrix[i][j] = distanceToIndexMatrix[i][j].index; - } } let pointsMoved = 0;