首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > KD树纯Python实现。

KD树纯Python实现。

  • 资源大小:6.13 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: python 实现 KD

资 源 简 介

kd-tree (http://en.wikipedia.org/wiki/Kd-tree) is a space-partitioning data structure for organizing points in a k-dimensional space. kd-trees are a useful data structure for several applications, such as searches involving a multidimensional search key (e.g. range searches and nearest neighbor searches). Nearest-neighbours search is implemented. Currently, adding/removing elements as well as balancing the tree is not yet implemented. The project is meant as a simple learning resource. Faster C-based modules should be used for production. Example usage: ``` from kdtree import KDTree data = [(1,2,3),(4,0,1),(5,3,1),(10,5,4),(9,8,9),(4,2,4)] tree = KDTree.constructfromdata(data) nearest = tree.query(query_point=(5,4,3), t=3) ```
VIP VIP
  • 大智若愚 2小时前 成为了本站会员

  • Mason 4小时前 成为了本站会员

  • 5小时前 成为了本站会员

  • Half_Punch 1天前 成为了本站会员

  • liqing71718 1天前 成为了本站会员

  • 伟国 1天前 成为了本站会员

  • songy 1天前 成为了本站会员

  • 纯色幽默 1天前 成为了本站会员

  • odd? 1天前 成为了本站会员

  • 52JOY... 1天前 成为了本站会员

0.163516s