Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion include/usearch/index.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3899,7 +3899,11 @@ class index_gt {
// If `new_slot` is already present in the neighboring connections of `close_slot`
// then no need to modify any connections or run the heuristics.
if (close_header.size() < connectivity_max) {
close_header.push_back(new_slot);
if (std::all_of(close_header.begin(), close_header.end(), [new_slot](compressed_slot_t slot) {
return slot != new_slot;
})) {
close_header.push_back(new_slot);
}
continue;
}

Expand Down
Loading