computeIdxFromDistIdx.Rd
computeIdxFromDistIdx
computes the indices of two
points whose distance appears at given position in a distance matrix
(as computed by dist
).
computeIdxFromDistIdx(n, i)
n | number of points |
---|---|
i | index into the distance matrix |
a vector of two indices of points whose distance appears at given position in a distance matrix.
x <- 1:10 d <- dist(x) # entries holding distances between point 3 and 7 i<-computeDistIdx(length(x), 3, 7) print(i)#> [1] 21#> [1] 6.946222 #> [1] 3print(ii)#> [1] 3 7