knncolle_hnsw
knncolle bindings for HNSW
Loading...
Searching...
No Matches
Public Attributes | List of all members
knncolle_hnsw::HnswOptions< Dim_, InternalData_ > Struct Template Reference

Options for HnswBuilder and HnswPrebuilt. More...

#include <knncolle_hnsw.hpp>

Public Attributes

int num_links = 16
 
int ef_construction = 200
 
int ef_search = 10
 
DistanceOptions< Dim_, InternalData_distance_options
 

Detailed Description

template<typename Dim_ = int, typename InternalData_ = float>
struct knncolle_hnsw::HnswOptions< Dim_, InternalData_ >

Options for HnswBuilder and HnswPrebuilt.

This can also be created via using the HnswBuilder::Options definition, which ensures consistency of template parameters with HnswBuilder.

Template Parameters
Dim_Integer type for the number of dimensions. For the HnswBuilder constructor, this should be equal to Matrix_::dimension_type.
InternalData_Floating point type for the HNSW index.

Member Data Documentation

◆ distance_options

Choice of distance metric to be used during HNSW index construction and search.

◆ ef_construction

template<typename Dim_ = int, typename InternalData_ = float>
int knncolle_hnsw::HnswOptions< Dim_, InternalData_ >::ef_construction = 200

Size of the dynamic list of nearest neighbors during index construction. This controls the trade-off between indexing time and accuracy and is equivalent to the ef_construct parameter in the underlying hnswlib library, see here for details.

◆ ef_search

template<typename Dim_ = int, typename InternalData_ = float>
int knncolle_hnsw::HnswOptions< Dim_, InternalData_ >::ef_search = 10

Size of the dynamic list of nearest neighbors during searching. This controls the trade-off between search speed and accuracy and is equivalent to the ef parameter in the underlying hnswlib library, see here for details.

◆ num_links

template<typename Dim_ = int, typename InternalData_ = float>
int knncolle_hnsw::HnswOptions< Dim_, InternalData_ >::num_links = 16

Number of bidirectional links for each node. This is equivalent to the M parameter in the underlying hnswlib library, see here for details.


The documentation for this struct was generated from the following file: