Embeddable integration of Hierarchical Navigable Small World(HNSW) Graph for ANN search. This project is forked from this repository. We aim to integrate HNSW and key-value datastore such as LevelDB for better memory usage and persistency reasons.
A good default for M and M0 parameters is 12 and 24 respectively. According to the paper, M0 should always be double M, but you can change both of them freely.
To see how this might be used with euclidean space, see tests/simple.rs.
This is based on the paper "Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs" by Yu. A. Malkov and D. A. Yashunin. This paper builds on the original paper for NSW. There are multiple papers written by the authors on NSW, which preceeded HNSW.
This is in no way a direct copy or reimplementation of the original implementation. This was made purely based on the paper without reference to the original headers. The paper is very well written and easy to understand, with some minor exceptions. Thank you to the authors for your valuble contribution.