knncolle_hnsw
knncolle bindings for HNSW
Loading...
Searching...
No Matches
knncolle_hnsw::DistanceConfig< HnswData_ > Struct Template Reference

Distance configuration for the HNSW index. More...

#include <distances.hpp>

Public Attributes

std::function< hnswlib::SpaceInterface< HnswData_ > *(std::size_t)> create
 
std::function< HnswData_(HnswData_)> normalize
 

Detailed Description

template<typename HnswData_ = float>
struct knncolle_hnsw::DistanceConfig< HnswData_ >

Distance configuration for the HNSW index.

Template Parameters
HnswData_Floating-point type for data in the HNSW index.

Member Data Documentation

◆ create

template<typename HnswData_ = float>
std::function<hnswlib::SpaceInterface<HnswData_>*(std::size_t)> knncolle_hnsw::DistanceConfig< HnswData_ >::create

Create a hnswlib::SpaceInterface object, given the number of dimensions.

◆ normalize

template<typename HnswData_ = float>
std::function<HnswData_(HnswData_)> knncolle_hnsw::DistanceConfig< HnswData_ >::normalize

Normalization function to convert distance measures from hnswlib::SpaceInterface::get_dist_func() into actual distances. If not provided , this defaults to a no-op.


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