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

Distance options for the HNSW index. More...

#include <distances.hpp>

Public Attributes

std::function< hnswlib::SpaceInterface< InternalData_ > *(Dim_)> create
 
std::function< InternalData_(InternalData_)> normalize
 

Detailed Description

template<typename Dim_, typename InternalData_>
struct knncolle_hnsw::DistanceOptions< Dim_, InternalData_ >

Distance options for the HNSW index.

Template Parameters
Dim_Integer type for the number of dimensions.
InternalData_Floating point type for the HNSW index.

Member Data Documentation

◆ create

std::function<hnswlib::SpaceInterface<InternalData_>*(Dim_)> knncolle_hnsw::DistanceOptions< Dim_, InternalData_ >::create

Create a hnswlib::SpaceInterface object, given the number of dimensions. If not provided, this defaults to hnswlib::L2Space if InternalData_ = float, otherwise it defaults to SquaredEuclideanDistance.

◆ normalize

Normalization function to convert distance measures from hnswlib::SpaceInterface::get_dist_func() into actual distances. If not provided and create is also provided, this defaults to a no-op. If not provided and create is not provided, this defaults to the square root function (i.e., to convert the L2 norm to a Euclidean distance).


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