基于空间主体建模数据结构数据结构、建模、主体、空间

2023-09-07 13:32:50 作者:pseudo 伪情

什么是一些很好的数据结构,用于跟踪代理二维,空间模拟?

What are some good data structures for keeping track of agents in a two-dimensional, spatial simulation?

我已经看到了一些参考四叉树(据我所知)和KD树(我不很了解)。

I've seen some references to quadtrees (which I understand) and kd-trees (which I don't understand very well).

我在寻找的东西,通过该代理可以有效地说,我知道我的位置,我想知道哪些药在我旁边(我自己在一定范围内)。

I'm looking for something through which an agent can efficiently say, "I know my location, and I would like to know which agents are near me (within a certain radius of myself)."

例子(伪code是罚款)将大大AP preciated。

Examples (pseudo-code is fine) would be greatly appreciated.

我在工作中的Java。

I'm working in Java.

推荐答案

我找到了一些所谓的的斗PR四叉树。

I have found something called a Bucket PR Quadtree.