which_minV {resemble}R Documentation

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

Description

For internal use only

Usage

which_minV(X,cores)

Arguments

X

a vector of distance (as computed in resemble:::fastDistVV or base::dist)

cores

number of cores used to run the computation

Details

Used internally to find the nearest neighbours. It searches in lower (or upper?) trianguular 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 neighbours

Author(s)

Antoine Stevens


[Package resemble version 1.2.2 Index]