Struct faiss::simd_result_handlers::ReservoirTopN

template<class C>
struct ReservoirTopN

Public Types

using T = typename C::T
using TI = typename C::TI

Public Functions

inline ReservoirTopN(size_t n, size_t capacity, T *vals, TI *ids)
inline void add(T val, TI id)
inline void shrink_xx()

shrink number of stored elements to n

inline void shrink()
inline void shrink_fuzzy()

Public Members

T *vals
TI *ids
size_t i
size_t n
size_t capacity
size_t cycles = 0
T threshold