#include <IndexHNSW.h>
Public Member Functions | |
IndexHNSWPQ (int d, int pq_m, int M) | |
void | train (idx_t n, const float *x) override |
Trains the storage if needed. | |
HNSW::DistanceComputer * | get_distance_computer () const override |
![]() | |
IndexHNSW (int d=0, int M=32) | |
IndexHNSW (Index *storage, int M=32) | |
void | add (idx_t n, const float *x) override |
void | search (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override |
entry point for search | |
void | reconstruct (idx_t key, float *recons) const override |
void | reset () override |
removes all elements from the database. | |
void | shrink_level_0_neighbors (int size) |
void | search_level_0 (idx_t n, const float *x, idx_t k, const storage_idx_t *nearest, const float *nearest_d, float *distances, idx_t *labels, int nprobe=1, int search_type=1) const |
void | init_level_0_from_knngraph (int k, const float *D, const idx_t *I) |
alternative graph building | |
void | init_level_0_from_entry_points (int npt, const storage_idx_t *points, const storage_idx_t *nearests) |
alternative graph building | |
void | reorder_links () |
void | link_singletons () |
![]() | |
Index (idx_t d=0, MetricType metric=METRIC_L2) | |
virtual void | add_with_ids (idx_t n, const float *x, const long *xids) |
virtual void | range_search (idx_t n, const float *x, float radius, RangeSearchResult *result) const |
void | assign (idx_t n, const float *x, idx_t *labels, idx_t k=1) |
virtual long | remove_ids (const IDSelector &sel) |
virtual void | reconstruct_n (idx_t i0, idx_t ni, float *recons) const |
virtual void | search_and_reconstruct (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels, float *recons) const |
void | compute_residual (const float *x, float *residual, idx_t key) const |
void | display () const |
Additional Inherited Members | |
![]() | |
typedef HNSW::storage_idx_t | storage_idx_t |
![]() | |
typedef long | idx_t |
all indices are this type | |
![]() | |
HNSW | hnsw |
bool | own_fields |
Index * | storage |
ReconstructFromNeighbors * | reconstruct_from_neighbors |
![]() | |
int | d |
vector dimension | |
idx_t | ntotal |
total nb of indexed vectors | |
bool | verbose |
verbosity level | |
bool | is_trained |
set if the Index does not require training, or if training is done already | |
MetricType | metric_type |
type of metric this index uses for search | |
PQ index topped with with a HNSW structure to access elements more efficiently.
Definition at line 292 of file IndexHNSW.h.