두 번째 점을 각각 morton code
으로 변환하기 위해 decode/encode
방법을 구현했습니다.모르몬 코드가있는 가장 가까운 이웃을 찾습니다
points=[(200,300),(500,150),(100,50)]
mortonCodes = {}
for p in points:
mortonCodes[encode(p)] = p
nearest = findNearestNeighbor(mortonCodes, (201,305))
print(nearest) # ---> should return (200,300)
가 어떻게이게 가능 : 내가 찾던
그래서이 같은 예를 들어 뭔가를 (A min_distance
에서) 가장 가까운 이웃을 찾는 것입니다?
네가 옳다. PH-Tree에 대해 잘 모르기 때문에 upvote 할 것이고 이것이 더 나은 해결책이 될 것이라고 생각한다. – greedsin
또한이 [답변] (http://stackoverflow.com/questions/4260002/benefits-of-nearest-neighbor-search-with-morton-order?rq=1)을 살펴보고 특히 몰몬경을 이용한 kNN 검색에 대한 PDF – TilmannZ