Description Usage Arguments Value
View source: R/nearest_neighbor_functions.R
Naive brute force nearest neighbor finder
1 | find_ordered_nn_brute(locs, m)
|
locs |
matrix of locations |
m |
number of neighbors |
An matrix containing the indices of the neighbors. Row i
of the
returned matrix contains the indices of the nearest m
locations to the i
'th location. Indices are ordered within a
row to be increasing in distance. By convention, we consider a location
to neighbor itself, so the first entry of row i
is i
, the
second entry is the index of the nearest location, and so on. Because each
location neighbors itself, the returned matrix has m+1
columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.