2014-02-07 244 views
0

什麼樣的數據結構應該用於二維最近鄰居搜索?接近最近鄰居搜索

我搜索了一下,發現有很多這樣的數據結構:k-d樹,四叉樹,八叉樹。 那麼我應該使用什麼樣的結構?

+1

可能的重複項:http://stackoverflow.com/questions/3944649/suitable-choice-of-data-structure-and-algorithm-for-fast-k-nearest-neighbor-sear?rq=1 http:/ /stackoverflow.com/questions/15820226/nearest-neighbor-search-in-2d-using-a-grid-partitioning?rq=1 http://stackoverflow.com/questions/4172358/all-k-nearest-neighbors- in-2d-c - 你研究了現有的答案嗎? – eis

+0

這取決於您的要求。嘗試一些,看看最好的。 – Henry

回答

1

我建議一個R-Tree,它是專爲此目的而設計的。

+0

請問您能澄清一下它的優點,比如kd-tree。 –

+1

坦率地說,我沒有使用後者,所以我不能詳細說明,但是這個問題早些時候提出來:http://stackoverflow.com/questions/4326332/could-anyone-tell-me-whats-the-差之間-KD-樹和R樹 – pentadecagon