Skip to content

Commit 2d2cfb3

Browse files
authored
fix bkt bug: shuffle bug when clustering (#349)
1 parent ebeb690 commit 2d2cfb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AnnService/inc/Core/Common/BKTree.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ namespace SPTAG
112112
for (int k = 1; k < _K; k++) pos[k] = pos[k - 1] + newCounts[k - 1];
113113

114114
for (int k = 0; k < _K; k++) {
115-
if (newCounts[k] == 0) continue;
115+
if (counts[k] == 0) continue;
116116
SizeType i = pos[k];
117117
while (newCounts[k] > 0) {
118118
SizeType swapid = pos[label[i]] + newCounts[label[i]] - 1;

0 commit comments

Comments
 (0)