Rnanoflann is a wrapper for C++’s library nanoflan which performs nearest neighbors search using kd-trees.
You can use the exported Rnanoflann::nn
function or directly nanoflan via LinkignTo mechanism.
Rnanoflann export the function nn
that performs nearest neighbors search with options:
M x d
matrix
where each of the M rows is a point.N x d
matrix
that will be queried against data. d, the number of columns, must be the same as data. If missing, defaults to data.FALSE
standard
and radius
.0.0
.Add in Description in LinkingTo section the Rnanoflann and then:
#include "nanoflann.hpp"
. Refer to nanoflan for more details.Rnanoflann::nn
via C++
. Just #include "Rnanoflann.h"
. The available implemented function are use Rcpp
and RcppArmadillo
. For custom matrices you need to implement you own adaptor (see above).