javascript中的实体k-d树实现? [英] Solid k-d tree implementation in javascript?

查看:75
本文介绍了javascript中的实体k-d树实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在模拟中进行一系列距离查询,并且不希望循环遍历所有点。 (N ** 2不能很好地扩展,事实证明)。

I'm looking to do a bunch of distance queries in a simulation, and would prefer not to loop over all the points. (N**2 doesn't scale that well, it turns out).

是否有一个坚实的 kd树(或其他球树,我猜)在javascript中实现任何人都可以推荐?

Is there a solid k-d tree (or other ball tree, I suppose) implementation in javascript that anyone can recommend?

推荐答案

这是另一个可能证明有用的非常好的实现(免责声明 - 我是作者):

Here is another pretty good implementation that might prove useful (disclaimer - I am the author):

https://github.com/ubilabs/kd-tree-javascript

这篇关于javascript中的实体k-d树实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆