开发者

algorithm for searching in ranges

I am given a huge list of objects with attributes x and y. We are require开发者_运维技巧d to search for all objects lying between a given upper and lower bound of both the attributes.

I was wondering if there is an efficient algorithm to implement this.

Thanks!


There are standard algorithms for this. See http://en.wikipedia.org/wiki/R-tree for one.


A quadtree or a spatial index (a space-filling curve, for example a hilbert curve).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜