“Spatial” data structure for range/KNN queries with similarity defined by kernel
I am currently looking for a datastructure to store datapoints that allows for range/KNN queries based on a similarity measure definte by a kernal function.
Essentially I want to solve the following problem: