|
|
| IndexIVFFlatIPBounds (Index *quantizer, size_t d, size_t nlist, size_t fsize) |
| |
|
virtual void | add_core (idx_t n, const float *x, const long *xids, const long *precomputed_idx) override |
| | same as add_with_ids, with precomputed coarse quantizer
|
| |
| virtual void | search (idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override |
| |
|
| IndexIVFFlat (Index *quantizer, size_t d, size_t nlist_, MetricType=METRIC_INNER_PRODUCT) |
| |
| virtual void | set_typename () override |
| |
|
virtual void | add_with_ids (idx_t n, const float *x, const long *xids) override |
| | implemented for all IndexIVF* classes
|
| |
| virtual void | range_search (idx_t n, const float *x, float radius, RangeSearchResult *result) const override |
| |
| void | copy_subset_to (IndexIVFFlat &other, int subset_type, long a1, long a2) const |
| |
|
virtual void | reset () override |
| | removes all elements from the database.
|
| |
| virtual long | remove_ids (const IDSelector &sel) override |
| |
|
void | search_knn_inner_product (size_t nx, const float *x, const long *keys, float_minheap_array_t *res) const |
| | Implementation of the search for the inner product metric.
|
| |
|
void | search_knn_L2sqr (size_t nx, const float *x, const long *keys, float_maxheap_array_t *res) const |
| | Implementation of the search for the L2 metric.
|
| |
| virtual void | reconstruct (idx_t key, float *recons) const override |
| |
| virtual void | merge_from_residuals (IndexIVF &other) override |
| |
| | IndexIVF (Index *quantizer, size_t d, size_t nlist, MetricType metric=METRIC_INNER_PRODUCT) |
| |
|
virtual void | train (idx_t n, const float *x) override |
| | Trains the quantizer and calls train_residual to train sub-quantizers.
|
| |
|
virtual void | add (idx_t n, const float *x) override |
| | Quantizes x and calls add_with_key.
|
| |
| virtual void | train_residual (idx_t n, const float *x) |
| |
| virtual void | merge_from (IndexIVF &other, idx_t add_id) |
| |
|
void | make_direct_map () |
| | intialize a direct map
|
| |
|
double | imbalance_factor () const |
| | 1= perfectly balanced, >1: imbalanced
|
| |
|
void | print_stats () const |
| | display some stats about the inverted lists
|
| |
|
| Index (idx_t d=0, MetricType metric=METRIC_INNER_PRODUCT) |
| |
| void | assign (idx_t n, const float *x, idx_t *labels, idx_t k=1) |
| |
| virtual void | reconstruct_n (idx_t i0, idx_t ni, float *recons) const |
| |
| void | compute_residual (const float *x, float *residual, idx_t key) const |
| |
| void | display () const |
| |
| virtual std::string | get_typename () const |
| |
|
|
size_t | fsize |
| | nb of dimensions of pre-filter
|
| |
|
std::vector< std::vector< float > > | part_norms |
| | norm of remainder (dimensions fsize:d)
|
| |
| std::vector< std::vector< float > > | vecs |
| |
|
size_t | nlist |
| | number of possible key values
|
| |
|
size_t | nprobe |
| | number of probes at query time
|
| |
|
Index * | quantizer |
| | quantizer that maps vectors to inverted lists
|
| |
|
bool | quantizer_trains_alone |
| | just pass over the trainset to quantizer
|
| |
|
bool | own_fields |
| | whether object owns the quantizer
|
| |
|
ClusteringParameters | cp |
| | to override default clustering params
|
| |
|
std::vector< std::vector< long > > | ids |
| | Inverted lists for indexes.
|
| |
|
bool | maintain_direct_map |
| | map for direct access to the elements. Enables reconstruct().
|
| |
|
std::vector< long > | direct_map |
| |
|
std::string | index_typename |
| |
|
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
|
| |
Definition at line 191 of file IndexIVF.h.