Finds the K nearest neighbors of the query object.
Finds the K nearest neighbors of the query object. The naive implementation here searches through all the the objects in the RDD to get the KNN. The nearness of the objects here is decided on the basis of the distance between their centers.
object to which the knn are to be found
RDD of a Shape3D (Shape3DRDD)
number of nearest neighbors are to be found
knn
Much more efficient implementation of the KNN query above.
Much more efficient implementation of the KNN query above. First we seek the partitions in which the query object belongs and we will look for the knn only in those partitions. After this if the limit k is not satisfied, we keep looking similarly in the neighbors of the containing partitions.
object to which the knn are to be found
RDD of a Shape3D (Shape3DRDD)
number of nearest neighbors are to be found
knn