knn_tree: Helper KNN Function for Trees

View source: R/Utilities.R

knn_treeR Documentation

Helper KNN Function for Trees

Description

Computes nearest-neighbor indices and distances in serial. Query is over all points and results do not include the self-distance.

Usage

knn_tree(leaves, k, distances)

Arguments

leaves

leaves to find the nearest neighbors of

k

number of neighbors to query

distances

matrix of Samples x Samples matrix of cophenetic tree distances

Value

list with two items: index: Samples x K matrix of neighbor indices dist: Samples x K matrix of neighbor distances


YosefLab/VISION documentation built on June 14, 2024, 5:27 p.m.