开发者

How do range queries work in Python's kd-tree? [closed]

开发者 https://www.devze.com 2023-01-11 13:34 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_Python百科
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_Python百科

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 1 year ago.

Improve this question

What is a range query over a kdtree and how is it done by python?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号