Struct faiss::IDSelectorBitmap

struct IDSelectorBitmap : public faiss::IDSelector

One bit per element. Constructed with a bitmap, size ceil(n / 8).

Public Functions

IDSelectorBitmap(size_t n, const uint8_t *bitmap)

Construct with a binary mask

Parameters:
  • n – size of the bitmap array

  • bitmap – id will be selected iff id / 8 < n and bit number (i%8) of bitmap[floor(i / 8)] is 1.

virtual bool is_member(idx_t id) const final
inline ~IDSelectorBitmap() override

Public Members

size_t n
const uint8_t *bitmap