Add kNeighbors method.