Define a function to make nn list, which can be further used to make adjacency matrix This scan row by row, looking for k.param nearest neighbours

MakeNN(d, k.param = 15)

Arguments

d

Distance matrix, can be a dist object or matrix

k.param

Default is 15

Value

return an nn list, which has two components: nn$idx and nn$dist