#include <hnsw_index.h>
|
| static std::unique_ptr< HNSWIndex > | load (const std::string &filename) |
| |
|
| static constexpr uint32_t | MAGIC = 0x51565244 |
| |
| static constexpr uint32_t | VERSION = 2 |
| |
| static constexpr int | MAX_LEVEL = 32 |
| |
| static constexpr size_t | INVALID_ID = static_cast<size_t>(-1) |
| |
Definition at line 55 of file hnsw_index.h.
◆ HNSWIndex()
| vanedb::HNSWIndex::HNSWIndex |
( |
size_t |
dimension, |
|
|
DistanceMetric |
metric = DistanceMetric::L2, |
|
|
size_t |
max_elements = 100000, |
|
|
size_t |
M = 16, |
|
|
size_t |
ef_construction = 200, |
|
|
uint32_t |
seed = 42 |
|
) |
| |
|
inlineexplicit |
◆ add()
| void vanedb::HNSWIndex::add |
( |
uint64_t |
id, |
|
|
const float * |
vec |
|
) |
| |
|
inline |
◆ capacity()
| size_t vanedb::HNSWIndex::capacity |
( |
| ) |
const |
|
inline |
◆ contains()
| bool vanedb::HNSWIndex::contains |
( |
uint64_t |
id | ) |
const |
|
inline |
◆ dimension()
| size_t vanedb::HNSWIndex::dimension |
( |
| ) |
const |
|
inline |
◆ get_ef_search()
| size_t vanedb::HNSWIndex::get_ef_search |
( |
| ) |
const |
|
inline |
◆ get_vector()
| std::vector< float > vanedb::HNSWIndex::get_vector |
( |
uint64_t |
id | ) |
const |
|
inline |
◆ load()
| static std::unique_ptr< HNSWIndex > vanedb::HNSWIndex::load |
( |
const std::string & |
filename | ) |
|
|
inlinestatic |
◆ save()
| void vanedb::HNSWIndex::save |
( |
const std::string & |
filename | ) |
const |
|
inline |
◆ search()
| std::vector< HNSWSearchResult > vanedb::HNSWIndex::search |
( |
const float * |
query, |
|
|
size_t |
k |
|
) |
| const |
|
inline |
◆ set_ef_search()
| void vanedb::HNSWIndex::set_ef_search |
( |
size_t |
ef | ) |
|
|
inline |
◆ size()
| size_t vanedb::HNSWIndex::size |
( |
| ) |
const |
|
inline |
◆ INVALID_ID
| constexpr size_t vanedb::HNSWIndex::INVALID_ID = static_cast<size_t>(-1) |
|
staticconstexpr |
◆ MAGIC
| constexpr uint32_t vanedb::HNSWIndex::MAGIC = 0x51565244 |
|
staticconstexpr |
◆ MAX_LEVEL
| constexpr int vanedb::HNSWIndex::MAX_LEVEL = 32 |
|
staticconstexpr |
◆ VERSION
| constexpr uint32_t vanedb::HNSWIndex::VERSION = 2 |
|
staticconstexpr |
The documentation for this class was generated from the following file: