rcpp_get_nearest_neighbor function

First nearest neighbor distance