HnswParam: The HnswParam class

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

View source: R/Hnsw-class.R

Description

A class to hold parameters for the Hnsw algorithm for approximate nearest neighbor identification.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
HnswParam(nlinks=16, ef.construction=200, directory=tempdir(), 
    ef.search=10, distance="Euclidean")

HnswParam_nlinks(x)

HnswParam_ef_construction(x)

HnswParam_directory(x)

HnswParam_ef_search(x)

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

Arguments

nlinks

Integer scalar, number of bi-directional links per element for index generation.

ef.construction

Integer scalar, size of the dynamic list for index generation.

directory

String specifying the directory in which to save the index.

ef.search

Integer scalar, size of the dynamic list for neighbor searching.

distance

A string specifying the distance metric to use.

x, object

A HnswParam object.

Details

The HnswParam class holds any parameters associated with running the HNSW algorithm. This generally relates to building of the index - see buildHnsw for details.

Value

The HnswParam constructor will return an instance of the HnswParam class.

HnswParam_nlinks and HnswParam_ef_construction will return the number of links and the size of the dynamic list, respectively, as integer scalars.

HnswParam_directory will return the directory as a string.

HnswParam_ef_search will return the size of the dynamic list to be used during searching.

Author(s)

Aaron Lun

See Also

buildHnsw

Examples

1
2
3
4
5

BiocNeighbors documentation built on Dec. 9, 2020, 2:01 a.m.