18 #include "VectorTransform.h"
25 typedef unsigned char uint8_t;
55 void add(
idx_t n,
const float* x)
override;
62 idx_t* labels)
const override;
64 void reset()
override;
Randomly rotate a set of vectors.
int bytes_per_vec
nb of 8-bits per encoded vector
std::vector< float > thresholds
thresholds to compare with
bool train_thresholds
whether we train thresholds or use 0
void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override
RandomRotationMatrix rrot
optional random rotation
void transfer_thresholds(LinearTransform *vt)
long idx_t
all indices are this type
void reset() override
removes all elements from the database.
void add(idx_t n, const float *x) override
void train(idx_t n, const float *x) override
int nbits
nb of bits per vector
const float * apply_preprocess(idx_t n, const float *x) const
bool rotate_data
whether to apply a random rotation to input
std::vector< uint8_t > codes
encoded dataset