Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Add a dynamic LSH table #2
updates are supported in some of the core classes, in particular the DynamicLinearProbingHashTable and the DynamicCompositeHashTable:
What we need next is a dynamic version of the StaticLSHTable in
We should be able to re-use quite a bit of code here. The main difference is that the static LSH table always assumes that the key range is between 0 and data_set_size - 1. This allows us to simply keep a large array for checking whether a certain candidate already appears in the answer for the current query. If the key range is arbitrary, we need a less specialized set data structure here (a hash table would probably be the right thing). Overall it should not be a big performance issue, but it's good to get it right.
The code is organized so that the query objects in the LSHTable are only responsible for producing a list of candidates. The actual distances are then computed in the NearestNeighborQuery class:
Two questions about your application: