11 #ifndef FAISS_INDEX_IVF_FLAT_H
12 #define FAISS_INDEX_IVF_FLAT_H
32 virtual void add_core (
idx_t n,
const float * x,
const long *xids,
33 const long *precomputed_idx);
40 const float *centroid_dis,
41 float *distances,
idx_t *labels,
42 bool store_pairs)
const override;
61 float* recons)
const override;
void assign(idx_t n, const float *x, idx_t *labels, idx_t k=1)
void range_search(idx_t n, const float *x, float radius, RangeSearchResult *result) const override
void add_with_ids(idx_t n, const float *x, const long *xids) override
implemented for all IndexIVF* classes
long idx_t
all indices are this type
void reconstruct_from_offset(long list_no, long offset, float *recons) const override
void update_vectors(int nv, idx_t *idx, const float *v)
Index * quantizer
quantizer that maps vectors to inverted lists
void search_preassigned(idx_t n, const float *x, idx_t k, const idx_t *assign, const float *centroid_dis, float *distances, idx_t *labels, bool store_pairs) const override
MetricType
Some algorithms support both an inner product version and a L2 search version.
virtual void add_core(idx_t n, const float *x, const long *xids, const long *precomputed_idx)
same as add_with_ids, with precomputed coarse quantizer