Python 的 kd 树中范围查询如何工作?

发布于 2024-09-14 12:00:56 字数 1434 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鸢与 2024-09-21 12:00:56

假设您正在谈论 scipy.spatial 中的 kd 树< /a>,有几个范围查询。也就是说,有多个函数将一个或多个点和一个半径作为输入,并在树中查询查询点半径内的所有点。

两个最明显的函数是 query_ball_pointquery_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 and query_ball_tree.

You can read the source code on github to see how these queries are implemented.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文