Learn R Programming

resemble (version 1.2.2)

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

Description

For internal use only

Usage

minDissV(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

Value

a vector of the indices of the nearest neighbours

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.