dist.to.knn: Produce k-NN Distance and Index Matrices from a Distance...

View source: R/path_geodesic_utils.R

dist.to.knnR Documentation

Produce k-NN Distance and Index Matrices from a Distance Matrix

Description

Produce k-NN Distance and Index Matrices from a Distance Matrix

Usage

dist.to.knn(d, k)

Arguments

d

Symmetric distance matrix.

k

Number of nearest neighbors to return per row.

Value

A list with nn.i and nn.d matrices.


dgraphs documentation built on Aug. 21, 2026, 1:08 a.m.