knncolle_hnsw
knncolle bindings for HNSW
|
Distance options for the HNSW index. More...
#include <distances.hpp>
Public Attributes | |
std::function< hnswlib::SpaceInterface< InternalData_ > *(Dim_)> | create |
std::function< InternalData_(InternalData_)> | normalize |
Distance options for the HNSW index.
Dim_ | Integer type for the number of dimensions. |
InternalData_ | Floating point type for the HNSW index. |
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
.
std::function<InternalData_(InternalData_)> knncolle_hnsw::DistanceOptions< Dim_, InternalData_ >::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).