Sort nearest neighbors after pushing batch peers

This commit is contained in:
Dirkjan Ochtman 2021-01-07 16:00:41 +01:00
parent d7c33e9e8f
commit bd9c3f3897
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ where
for added in done.iter().copied() {
search.push(added, &points[pid], &points);
}
// Because we've added new points, we need to sort the nearest neighbors
search.nearest.sort_unstable();
insert(&mut zero, pid, &search.nearest, &points);
done.push(pid);
pool.push(search);