Struct faiss::RangeSearchResult
-
struct RangeSearchResult
The objective is to have a simple result structure while minimizing the number of mem copies in the result. The method do_allocation can be overloaded to allocate the result tables in the matrix type of a scripting language like Lua or Python.
Public Functions
-
explicit RangeSearchResult(size_t nq, bool alloc_lims = true)
lims must be allocated on input to range_search.
-
virtual void do_allocation()
called when lims contains the nb of elements result entries for each query
-
virtual ~RangeSearchResult()
Public Members
-
size_t nq
nb of queries
-
size_t *lims
size (nq + 1)
-
idx_t *labels
result for query i is labels[lims[i]:lims[i+1]]
-
float *distances
corresponding distances (not sorted)
-
size_t buffer_size
size of the result buffers used
-
explicit RangeSearchResult(size_t nq, bool alloc_lims = true)