gpt4 book ai didi

python - scipy.spatial.KDTree 和 scipy.spatial.cKDTree 之间的区别

转载 作者:IT老高 更新时间:2023-10-28 22:08:12 27 4
gpt4 key购买 nike

这两种算法有什么区别?

最佳答案

cKDTreeKDTree 的子集,用 Cython 封装的 C++ 实现,因此速度更快。

他们每个人都是

a binary trie, each of whose nodes represents an axis-aligned hyperrectangle. Each node specifies an axis and splits the set of points based on whether their coordinate along that axis is greater than or less than a particular value.

但是KDTree

also supports all-neighbors queries, both with arrays of points and with other kd-trees. These do use a reasonably efficient algorithm, but the kd-tree is not necessarily the best data structure for this sort of calculation.

关于python - scipy.spatial.KDTree 和 scipy.spatial.cKDTree 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6931209/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com