Struct faiss::RangeSearchBlockResultHandler

template<class C, bool use_sel = false>
struct RangeSearchBlockResultHandler : public faiss::BlockResultHandler<C, false>

Public Types

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

Public Functions

inline RangeSearchBlockResultHandler(RangeSearchResult *res, float radius, const IDSelector *sel = nullptr)
inline virtual void begin_multiple(size_t i0_2, size_t i1_2)

begin

inline void add_results(size_t j0, size_t j1, const T *dis_tab)

add results for query i0..i1 and j0..j1

inline ~RangeSearchBlockResultHandler()
inline virtual void add_results(size_t, size_t, const typename C::T*)
inline virtual void end_multiple()
inline bool is_in_selection(idx_t i) const

Public Members

RangeSearchResult *res
T radius
std::vector<RangeSearchPartialResult*> partial_results
std::vector<size_t> j0s
int pr = 0
size_t nq
const IDSelector *sel
size_t i0
size_t i1
struct SingleResultHandler : public faiss::ResultHandler<C>

Public Functions

inline explicit SingleResultHandler(RangeSearchBlockResultHandler &rh)
inline void begin(size_t i)

begin results for query # i

inline virtual bool add_result(T dis, TI idx) final

add one result for query i

inline void end()

series of results for query i is done

inline ~SingleResultHandler()

Public Members

RangeSearchPartialResult pres
RangeQueryResult *qr = nullptr
C::T threshold = C::neutral()