I am dealing with space-time data (x,y,z,t) and I would like to find the k nearest neighbors that satisfy some conditions (eg < 10 km and < 10 s)
I could not find any implementation of such "constrained nearest neighbor" algorithm (although some research papers focus on this question).
Does any one know where I could find it (optimally implemented in R) ? Thank you