BC-Tree icon indicating copy to clipboard operation
BC-Tree copied to clipboard

about query

Open Sunshine066 opened this issue 1 year ago • 18 comments

Excuse me, is there no query function in ball_tree? How do I get query's nearest neighbor vector index this is my code my code:XX is a double* (size N*D) X_test is double** N is 10 D is 512

int leaf = 40;
p2h::Ball_Tree<double>* tree = new p2h::Ball_Tree<double>(N, D, leaf, XX);
tree->display();
p2h::MinK_List* list = new  p2h::MinK_List(10);
std::cout << "   nns   " << tree->nns(10, 10, 1, X_test[0], list) << std::endl;;

How to get X_test[0]'s nearest neighbor index tasnks

Sunshine066 avatar Mar 31 '23 09:03 Sunshine066