Struct faiss::NegativeDistanceComputer

struct NegativeDistanceComputer : public faiss::DistanceComputer

Public Functions

inline explicit NegativeDistanceComputer(DistanceComputer *basedis)
inline virtual void set_query(const float *x) override

called before computing distances. Pointer x should remain valid while operator () is called

inline virtual float operator()(idx_t i) override

compute distance of vector i to current query

inline virtual void distances_batch_4(const idx_t idx0, const idx_t idx1, const idx_t idx2, const idx_t idx3, float &dis0, float &dis1, float &dis2, float &dis3) override

compute distances of current query to 4 stored vectors. certain DistanceComputer implementations may benefit heavily from this.

inline virtual float symmetric_dis(idx_t i, idx_t j) override

compute distance between two stored vectors

inline virtual ~NegativeDistanceComputer()

Public Members

DistanceComputer *basedis

owned by this