find_ordered_nn_brute: Naive brute force nearest neighbor finder

View source: R/nearest_neighbor_functions.R

find_ordered_nn_bruteR Documentation

Naive brute force nearest neighbor finder

Description

Naive brute force nearest neighbor finder

Usage

find_ordered_nn_brute(locs, m)

Arguments

locs

matrix of locations

m

number of neighbors

Value

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.


joeguinness/GpGp documentation built on Feb. 22, 2024, 9:43 a.m.