We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac43973 commit a29c3ddCopy full SHA for a29c3dd
hnswlib/hnswalg.h
@@ -182,7 +182,7 @@ namespace hnswlib {
182
183
while (!candidateSet.empty()) {
184
std::pair<dist_t, tableint> curr_el_pair = candidateSet.top();
185
- if ((-curr_el_pair.first) > lowerBound) {
+ if ((-curr_el_pair.first) > lowerBound and top_candidates.size() == ef_construction_) {
186
break;
187
}
188
candidateSet.pop();
@@ -271,7 +271,7 @@ namespace hnswlib {
271
272
std::pair<dist_t, tableint> current_node_pair = candidate_set.top();
273
274
- if ((-current_node_pair.first) > lowerBound) {
+ if ((-current_node_pair.first) > lowerBound and top_candidates.size() == ef) {
275
276
277
candidate_set.pop();
0 commit comments