Java中的KDTree实现 [英] KDTree Implementation in Java
问题描述
我正在寻找Java中的KDTree实现。
我已经做了一个谷歌搜索,结果似乎很随和。实际上有很多结果,但是它们几乎只是一次性的一次性实现,而我宁愿找到一些更多的生产价值。像apache集合或.NET的优秀C5集合库。可以看到公共bug跟踪器的东西,并检查最后一个SVN提交的时间。此外,在理想的世界中,我会找到一个精心设计的空间数据结构API,KDTree将只是该图书馆的一个类。
I'm looking for a KDTree implementation in Java.
I've done a google search and the results seem pretty haphazard. There are actually lots of results, but they're mostly just little one-off implementations, and I'd rather find something with a little more "production value". Something like apache collections or the excellent C5 collection library for .NET. Something where I can see the public bug tracker and check to see when the last SVN commit happened. Also, in an ideal world, I'd find a nice well-designed API for spatial data structures, and the KDTree would be just one class in that library.
这个项目,我只会在2或3维中工作,而我大多只是对一个好的最近邻居的实现感兴趣。
For this project, I'll only be working in either 2 or 3 dimensions, and I'm mostly just interested in a good nearest-neighbors implementation.
推荐答案
在遗憾的算法一书中,Java中有一个kd树实现有几个变化。所有的代码都在 oreilly.com 上,这本书本身也引导您了解算法,以便您可以自己建一个。
In the book Algorithms in a Nutshell there is a kd tree implementation in java along with a few variations. All of the code is on oreilly.com and the book itself also walk you through the algorithm so you could build one yourself.
这篇关于Java中的KDTree实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!