Struct faiss::DirectMap
-
struct DirectMap
Direct map: a way to map back from ids to inverted lists
Public Types
-
enum Type
Values:
-
enumerator NoMap
-
enumerator Array
-
enumerator Hashtable
-
enumerator NoMap
Public Functions
-
DirectMap()
-
void set_type(Type new_type, const InvertedLists *invlists, size_t ntotal)
set type and initialize
-
inline bool no() const
for quick checks
-
void check_can_add(const idx_t *ids)
throw if Array and ids is not NULL
update the direct_map
-
void clear()
remove all entries
-
size_t remove_ids(const IDSelector &sel, InvertedLists *invlists)
remove ids from the InvertedLists, possibly using the direct map
operations on inverted lists that require translation with a DirectMap
-
void update_codes(InvertedLists *invlists, int n, const idx_t *ids, const idx_t *list_nos, const uint8_t *codes)
update entries, using the direct map
-
enum Type