From 06d90fdc7676c39924101ae07721cab2191b3b7d Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 11 Apr 2024 22:35:11 -0700 Subject: [PATCH] Updated comments [skip ci] --- src/ivfkmeans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ivfkmeans.c b/src/ivfkmeans.c index ee13b96..ee5c868 100644 --- a/src/ivfkmeans.c +++ b/src/ivfkmeans.c @@ -228,6 +228,7 @@ ComputeNewCenters(VectorArray samples, VectorArray aggCenters, VectorArray newCe int numCenters = aggCenters->maxlen; int numSamples = samples->length; + /* Reset sum and count */ for (int j = 0; j < numCenters; j++) { Vector *vec = (Vector *) VectorArrayGet(aggCenters, j); @@ -268,7 +269,7 @@ ComputeNewCenters(VectorArray samples, VectorArray aggCenters, VectorArray newCe for (int j = 0; j < numSamples; j++) centerCounts[closestCenters[j]] += 1; - /* Average centers */ + /* Divide sum by count */ for (int j = 0; j < numCenters; j++) { Vector *vec = (Vector *) VectorArrayGet(aggCenters, j);