KmknnIndex {BiocNeighbors} | R Documentation

## The KmknnIndex class

### Description

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

### Usage

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

    KmknnIndex_cluster_centers(x)

    KmknnIndex_cluster_info(x)

    ## S4 method for signature 'KmknnIndex'
    show(object)

### Arguments

`data` | A numeric matrix with data points in columns and dimensions in rows.
`centers` | A numeric matrix with clusters in columns and dimensions in rows.
`info` | A list of statistics for each cluster.
`order` | An integer vector of length equal to `ncol(data)`, specifying the order of observations.
`NAMES` | A character vector of sample names or `NULL`.
`distance` | A string specifying the distance metric to use.
`x, object` | A KmknnIndex object.

### 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`.

### Value

The `KmknnIndex` constructor will return an instance of the KmknnIndex class.

`KmknnIndex_cluster_centers` and related getters will return the corresponding slots of `object`.

### Author(s)

Aaron Lun

### See Also

`buildKmknn`

### Examples

    example(buildKmknn)
    str(KmknnIndex_cluster_centers(out))
    str(KmknnIndex_cluster_info(out))

[Package BiocNeighbors version 1.2.0 Index]