25 std::vector<float>
xb;
29 void add(
idx_t n,
const float* x)
override;
31 void reset()
override;
38 idx_t* labels)
const override;
61 const idx_t *labels)
const;
87 std::vector<float> shift;
96 idx_t* labels)
const override;
122 void add(
idx_t n,
const float* x)
override;
124 void reset()
override;
131 idx_t* labels)
const override;
149 void add(
idx_t n,
const float* x)
override;
151 void reset()
override;
159 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?
void range_search(idx_t n, const float *x, float radius, RangeSearchResult *result) const override
void train(idx_t n, const float *x) override
long idx_t
all indices are this type
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 vetsion and a L2 search version.
void add(idx_t n, const float *x) override