which_min_vector: A function to compute indices of minimum values of a distance...

View source: R/RcppExports.R

which_min_vectorR Documentation

A function to compute indices of minimum values of a distance vector

Description

For internal use only

Usage

which_min_vector(X)

Arguments

X

a vector of distances

Details

Used internally to find the nearest neighbors. It searches in lower (or upper) triangular matrix. Therefore this must be the format of the input data. The piece of code int len = (sqrt(X.size()*8+1)+1)/2 generated an error in CRAN since sqrt cannot be applied to integers.

Value

a vector of the indices of the nearest neighbors

Author(s)

Antoine Stevens


resemble documentation built on April 21, 2023, 1:13 a.m.