Assuming you are talking about the k-d tree in scipy.spatial, there are a couple of range queries. Which is to say, there are multiple functions that take as their input one or more points and a radius and query the tree for all points within the radius of the query points.
The two most obvious functions are query_ball_point and query_ball_tree.
You can read the source code on github to see how these queries are implemented.
发布评论
评论(1)
假设您正在谈论 scipy.spatial 中的 kd 树< /a>,有几个范围查询。也就是说,有多个函数将一个或多个点和一个半径作为输入,并在树中查询查询点半径内的所有点。
两个最明显的函数是
query_ball_point
和query_ball_tree
。您可以阅读github上的源代码来了解如何这些查询已实施。
Assuming you are talking about the k-d tree in scipy.spatial, there are a couple of range queries. Which is to say, there are multiple functions that take as their input one or more points and a radius and query the tree for all points within the radius of the query points.
The two most obvious functions are
query_ball_point
andquery_ball_tree
.You can read the source code on github to see how these queries are implemented.