Struct faiss::IDSelectorArray

struct IDSelectorArray : public faiss::IDSelector

Simple array of elements

is_member calls are very inefficient, but some operations can use the ids directly.

Public Functions

IDSelectorArray(size_t n, const idx_t *ids)

Construct with an array of ids to process

  • n – number of ids to store

  • ids – elements to store. The pointer should remain valid during IDSelectorArray’s lifetime

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

Public Members

size_t n
const idx_t *ids