I re implemented kdtree2, a kd-tree implementation in C++ (and Fortran) by Matthew B. Kennel, in mojo with some modifications: Mojmelo/mojmelo/utils/KDTree.mojo at main · yetalit/Mojmelo · GitHub
More information about kdtree2 (C++): GitHub - jmhodges/kdtree2: A kd-tree implementation in C++ (and Fortran) by Matthew B. Kennel
KD-Tree is a data structure to find the distance based nearest neighbors and has applications in Ray Tracing and KNN algorithm.
This was done as a part of my Mojmelo project to implement ML algorithms from scratch: GitHub - yetalit/Mojmelo: Machine Learning algorithms in pure Mojo 🔥
Here you can check how it is used in KNN implementation: Mojmelo/mojmelo/KNN.mojo at main · yetalit/Mojmelo · GitHub
3 Likes