Closed long-senpai closed 5 months ago
Uh, sorry for the late reply, there is currently no way of doing so, but it should be fairly straightforward to add by just keeping a list as we iterate through the tree
Working on the implementation in this branch https://github.com/crvs/KDTree/tree/knn
Hi there, thank you so much for the cool work. I want to report a bug in your knn branch. It seems master branch supports 2D points, but knn branch does not support 2D points.
thanks for reporting, as of yet the branch is not fit for use, I will try to debug that as well.
@slocked can you provide a minimal example reproducing the error? The error_test.cpp
seems to work fine for me when I substitute the point size to 2.
KDTree.hpp
(master branch), KDTree.cpp
(master branch), error_test.cpp
(master branch)}.error_test.cpp
with DIM=2
and DIM=3
works fine.KDTree.hpp
(knn branch), KDTree.cpp
(knn branch), error_test.cpp
(knn branch)}.error_test.cpp
with DIM=2
and DIM=3
works fine.nearest_point
.error_test.cpp
to knn_error_test.cpp
and run will get the same error.Are you sure you tested that in the latest commit to the KNN branch (as of yesterday)? because there was indeed an error in the commit before that (from May 10 I think) where the "nearest" query had a segfault.
also, the newest patch should have finally fixed the KNN query.
v2.0 introduces this feature
Hi, thank you so much for the cool work. I wonder is there anyway to get the list of K nearest points?