Well, I'm not sure exactly how it is implemented, but the MASON toolkit uses a discretization algorithm that places agents that are close to one another in the same "bucket" of a hash table. It makes for very fast lookups, as only a few of these buckets have to be checked for each query.
发布评论
评论(2)
好吧,我不确定它是如何实现的,但是 MASON 工具包使用一种离散化算法,将彼此接近的代理放置在哈希表的同一“桶”中。它可以实现非常快速的查找,因为每个查询只需检查其中的几个存储桶。
对您来说最好的事情可能是查看这里的源代码:
http:// /code.google.com/p/mason/source/browse/trunk/mason/sim/field/continuous/Continously2D.java?r=529
Well, I'm not sure exactly how it is implemented, but the MASON toolkit uses a discretization algorithm that places agents that are close to one another in the same "bucket" of a hash table. It makes for very fast lookups, as only a few of these buckets have to be checked for each query.
The best thing for you is probably to take a look at the source code here:
http://code.google.com/p/mason/source/browse/trunk/mason/sim/field/continuous/Continuous2D.java?r=529
我发现了一个叫做 Bucket PR Quadtree 的东西。
I have found something called a Bucket PR Quadtree.