13         MatrixXf M = MatrixXf::Random(3, 100);
 
   15         MatrixXf 
q = MatrixXf::Random(3, 50);
 
   28         indices.resize(5, 
q.cols());
 
   29         dists2.resize(5, 
q.cols());
 
   35         indices.resize(3, M.cols());
 
   36         dists2.resize(3, M.cols());
 
   40         for (
int i = 0; i < 100; ++i)
 
   43                 if (indices.coeff(0, i) != i)
 
   44                         cerr << 
"Oups, something went wrong: " << indices.coeff(0, i) << 
" " <<  i << endl;
 
   50         indices.resize(2, M.cols());
 
   51         dists2.resize(2, M.cols());
 
   52         nns->knn(M, indices, dists2, 2, 0.1, 0);
 
   53         for (
int i = 0; i < 50; ++i)
 
   56                 if (indices.coeff(0, i) == i)
 
   57                         cerr << 
"Oups, something went wrong: " << indices.coeff(0, i) << 
" " <<  i << endl;