23 std::vector<float>
xb;
27 void add(
idx_t n,
const float* x)
override;
29 void reset()
override;
36 idx_t* labels)
const override;
59 const idx_t *labels)
const;
85 std::vector<float> shift;
94 idx_t* labels)
const override;
120 void add(
idx_t n,
const float* x)
override;
122 void reset()
override;
129 idx_t* labels)
const override;
147 void add(idx_t n,
const float* x)
override;
149 void reset()
override;
157 idx_t* labels)
const override;
void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override
void reset() override
removes all elements from the database.
bool continuous_update
is the permutation updated continuously?
optimized version for 1D "vectors"
void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override
void reset() override
removes all elements from the database.
void update_permutation()
void reconstruct(idx_t key, float *recons) const override
void add(idx_t n, const float *x) override
long remove_ids(const IDSelector &sel) override
void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override
Index * base_index
faster index to pre-select the vectors that should be filtered
IndexFlat refine_index
storage for full vectors
bool own_fields
should the base index be deallocated?
long idx_t
all indices are this type
void range_search(idx_t n, const float *x, float radius, RangeSearchResult *result) const override
void train(idx_t n, const float *x) override
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
Warn: the distances returned are L1 not L2.
void compute_distance_subset(idx_t n, const float *x, idx_t k, float *distances, const idx_t *labels) const
std::vector< float > xb
database vectors, size ntotal * d
void reset() override
removes all elements from the database.
std::vector< idx_t > perm
sorted database indices
MetricType
Some algorithms support both an inner product version and a L2 search version.
void add(idx_t n, const float *x) override