Add two searching functions based on KdTree.