Skip to content

Commit 1787402

Browse files
author
Alena Rybakina
committed
Checking for a non-repeating neighbor should be carried out with already selected neighbors.
1 parent 3fe5839 commit 1787402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ build_knn_matrix(OkNNrdata *data, const OkNNrdata *temp_data, double *features)
15131513

15141514
for (i = 0; i < data->rows; i++)
15151515
{
1516-
if (k < aqo_K && !neirest_neighbor(data->matrix, old_rows, data->matrix[i], data->cols))
1516+
if (k < aqo_K && !neirest_neighbor(data->matrix, old_rows, temp_data->matrix[i], data->cols))
15171517
{
15181518
memcpy(data->matrix[k], temp_data->matrix[i], data->cols * sizeof(double));
15191519
data->rfactors[k] = temp_data->rfactors[i];

0 commit comments

Comments
 (0)