HnswParam {BiocNeighbors} | R Documentation |
A class to hold parameters for the Hnsw algorithm for approximate nearest neighbor identification.
HnswParam( nlinks = 16, ef.construction = 200, directory = tempdir(), ef.search = 10, distance = "Euclidean" )
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. |
The HnswParam class holds any parameters associated with running the HNSW algorithm.
This generally relates to building of the index - see buildHnsw
for details.
Users can get or set values with the usual [[
syntax.
All parameters listed in the constructor can be manipulated in this manner.
An instance of the HnswParam class.
Aaron Lun
buildHnsw
, for the index construction.
findHnsw
and related functions, for the actual search.
BiocNeighborParam, for the parent class and its available methods.
(out <- HnswParam()) out[['nlinks']] out[['nlinks']] <- 20L out