Compute exact k-nearest neighbors under the intrinsic Lorentz hyperbolic distance without returning the full pairwise distance matrix.
Value
A list with index, an n x k integer matrix of one-based neighbor
indices, distance, an n x k matrix of corresponding hyperbolic
distances, k, and include_self.
Examples
H <- simulate_H2(20, r_max = 3)
knn <- lorentz_knn(H$Z, k = 5)
str(knn)