KmknnIndex: The KmknnIndex class

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/KmknnIndex-class.R

Description

A class to hold indexing structures for the KMKNN algorithm for exact nearest neighbor identification.

Usage

1
KmknnIndex(data, centers, info, order, NAMES = NULL, distance = "Euclidean")

Arguments

data

A numeric matrix where columns correspond to data points and rows correspond to dimensions.

centers

A numeric matrix containing coordinates for cluster centroids, with clusters in columns and dimensions in rows.

info

A list containing additional information for each cluster, see buildKmknn for details.

order

An integer vector of length equal to ncol(data), specifying the order of points in x relative to the original data matrix.

NAMES

A character vector of sample names or NULL.

distance

A string specifying the distance metric to use.

Details

The KmknnIndex class holds the indexing structure required to run the KMKNN algorithm. Users should never need to call the constructor explicitly, but should generate instances of KmknnIndex classes with buildKmknn.

Users can get values from an HnswIndex object with the usual [[ syntax. All parameters listed in the constructor can be extracted in this manner.

Value

An instance of the KmknnIndex class.

Author(s)

Aaron Lun

See Also

buildKmknn, to build the index.

BiocNeighborIndex, for the parent class and its available methods.

Examples

1
2
3
example(buildKmknn)
out[['centers']]
out[['info']]

LTLA/BiocNeighbors documentation built on Sept. 18, 2021, 8:19 p.m.