Skip to contents

Constructs K-nearest neighbor adjacency matrix.

Usage

knn_adj_cpp(coords, k)

Arguments

coords

Numeric matrix of coordinates

k

Number of neighbors

Value

Binary adjacency matrix