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") HnswParam_nlinks(x) HnswParam_ef_construction(x) HnswParam_directory(x) HnswParam_ef_search(x) ## S4 method for signature 'HnswParam' show(object)
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. |
The HnswParam class holds any parameters associated with running the HNSW algorithm.
This generally relates to building of the index - see buildHnsw
for details.
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.
Aaron Lun
(out <- HnswParam()) HnswParam_nlinks(out) HnswParam_ef_construction(out) HnswParam_directory(out)