Hacker News new | past | comments | ask | show | jobs | submit login

How would you learn how to implement that algorythm if you'd just use an existing implementation?



Read the wiki page on it, run through the psuedocode on pen and paper a few times and then implement it.

Source: I did this when I wrote a library for reverse geocoding which uses a kd tree.

https://github.com/AReallyGoodName/OfflineReverseGeocode


Implementing a spatial tree is not the same as implementing Nearest neighbours. It's just a data structure to allow efficient culling.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: