nmslib / hnswlib

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

Getting the number of vectors in a bruteforce index #440

Open regstuff opened 1 year ago

regstuff commented 1 year ago

Hi Is there any way to get the number of elements currently in a bruteforce index (not the maximum elements). Something similar to get_current_count() that works for bf index also?

yurymalkov commented 1 year ago

Hi @regstuff , It is not implemented, though it is pretty straightforward to add. If you have time, a PR will be appreciated. Maybe @dyashuni can also help.