VptreeIndex {BiocNeighbors} | R Documentation

## The VptreeIndex class

### Description

A class to hold the vantage point tree for exact nearest neighbor identification.

### Usage

    VptreeIndex(data, nodes, order, NAMES = NULL, distance = "Euclidean")

### Arguments

`data` | A numeric matrix with data points in columns and dimensions in rows.
`nodes` | A list of vectors specifying the structure of the VP tree.
`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.

### Details

The VptreeIndex class holds the indexing structure required to run the VP tree algorithm. Users should never need to call the constructor explicitly, but should generate instances of VptreeIndex classes with `buildVptree`.

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

### Value

An instance of the VptreeIndex class.

### Author(s)

Aaron Lun

### See Also

`buildVptree`, for the index construction.

BiocNeighborIndex, for the parent class and its available methods.

### Examples

    example(buildVptree)
    str(out[["nodes"]])

[Package BiocNeighbors version 1.12.0 Index]