nmslib / hnswlib

Header-only C++/python library for fast approximate nearest neighbors
https://github.com/nmslib/hnswlib
Apache License 2.0
4.11k stars 607 forks source link

Question about how the code handles deleted entry point #527

Open siddhsql opened 7 months ago

siddhsql commented 7 months ago

w.r.t. this code:

if (epDeleted) {
                    top_candidates.emplace(fstdistfunc_(data_point, getDataByInternalId(enterpoint_copy), dist_func_param_), enterpoint_copy);
                    if (top_candidates.size() > ef_construction_)
                        top_candidates.pop();
                }

it the entry point is already deleted, why are we adding it to list of candidates?