Go to the documentation of this file.00001
00002
00003 #include "nabo/nabo.h"
00004
00005 int main()
00006 {
00007 using namespace Nabo;
00008 using namespace Eigen;
00009
00010
00011 MatrixXf M = MatrixXf::Random(3, 100);
00012
00013 VectorXf q = VectorXf::Random(3);
00014
00015
00016 NNSearchF* nns = NNSearchF::createKDTreeLinearHeap(M);
00017
00018
00019 const int K = 5;
00020 VectorXi indices(K);
00021 VectorXf dists2(K);
00022 nns->knn(q, indices, dists2, K);
00023
00024
00025 delete nns;
00026
00027 return 0;
00028 }