Does there exist nearest neighbor data structure that supports delete and add operations along with exact nearest neighbor queries? Looking for a Python implementation ideally.
Attempts:
- Found MANY implementations for approximate nearest neighbor queries in high dimensional spaces.
- Found KD Trees and Ball Trees but they do not allow for dynamic rebalancing.
- Thinking an algorithm could be possible with locality sensitive hashing.
- Looking at OctTrees.
Context:
- For each point of 10,000 points, query for it's nearest neighbor
- Evaluate each pair of neighbors
- Pick one and delete the pair of points and add a merged point.
- Repeat for some number of iterations