结构体 faiss::HCounterState

template<class HammingComputer>
struct HCounterState

此类维护到目前为止看到的最优距离的列表。

由于距离在一个有限的范围内(0 到 nbit),该对象维护每个可能距离的一个列表,并且只填充前 n 个列表,使得 n 个列表的大小之和小于 k。

公共函数

inline HCounterState(int *counters, int64_t *ids_per_dis, const uint8_t *x, int d, int k)
inline void update_counter(const uint8_t *y, size_t j)

公共成员

int *counters
int64_t *ids_per_dis
HammingComputer hc
int thres
int count_lt
int count_eq
int k