rcpp_get_nearest_neighbor function

First nearest neighbor distance

First nearest neighbor distance

Efficiently calculate the distance to the first nearest neighbor. Quasi linear runtime.

rcpp_get_nearest_neighbor(points)

Arguments

  • points: A two numeric matrix, where the first two columns are x and y

Returns

Vector

Author(s)

Florian Privé florian.prive.21@gmail.com