All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
faiss::BinaryInvertedListScanner Struct Referenceabstract

## Public Types

using | idx_t = Index::idx_t

## Public Member Functions

virtual void | set_query (const uint8_t *query_vector)=0
| from now on we handle this query.
virtual void | set_list (idx_t list_no, uint8_t coarse_dis)=0
| following codes come from this inverted list
virtual uint32_t | distance_to_code (const uint8_t *code) const =0
| compute a single query-to-code distance
virtual size_t | scan_codes (size_t n, const uint8_t *codes, const idx_t *ids, int32_t *distances, idx_t *labels, size_t k) const =0

## Detailed Description

Definition at line 187 of file IndexBinaryIVF.h.

## Member Function Documentation

virtual size_t faiss::BinaryInvertedListScanner::scan_codes | ( | size_t | n,
|  | const uint8_t * | codes,
|  | const idx_t * | ids,
|  | int32_t * | distances,
|  | idx_t * | labels,
|  | size_t | k
| ) |  | const

pure virtual

compute the distances to codes. (distances, labels) should be organized as a min- or max-heap

Parameters

  n | number of codes to scan
  codes | codes to scan (n * code_size)
  ids | corresponding ids (ignored if store_pairs)
  distances | heap distances (size k)
  labels | heap labels (size k)
  k | heap size

The documentation for this struct was generated from the following file:

- /tmp/faiss/IndexBinaryIVF.h