Class HnswSearch

Inheritance Relationships

Derived Type

Class Documentation

class n2::HnswSearch

Subclassed by n2::HnswSearchImpl< DistFuncType >

Public Functions

~HnswSearch()
void SearchByVector(const std::vector<float> &qvec, size_t k, int ef_search, bool ensure_k, std::vector<int> &result) = 0
void SearchByVector(const std::vector<float> &qvec, size_t k, int ef_search, bool ensure_k, std::vector<std::pair<int, float>> &result) = 0
void SearchById(int id, size_t k, int ef_search, bool ensure_k, std::vector<int> &result) = 0
void SearchById(int id, size_t k, int ef_search, bool ensure_k, std::vector<std::pair<int, float>> &result) = 0

Public Static Functions

std::unique_ptr<HnswSearch> GenerateSearcher(std::shared_ptr<const HnswModel> model, size_t data_dim, DistanceKind metric)