Faiss
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Public Attributes | List of all members
faiss::IDSelectorBatch Struct Reference

#include <AuxIndexStructures.h>

Inheritance diagram for faiss::IDSelectorBatch:
faiss::IDSelector

Public Types

typedef unsigned char uint8_t
 
- Public Types inherited from faiss::IDSelector
typedef Index::idx_t idx_t
 

Public Member Functions

 IDSelectorBatch (long n, const idx_t *indices)
 
bool is_member (idx_t id) const override
 

Public Attributes

std::unordered_set< idx_t > set
 
std::vector< uint8_t > bloom
 
int nbits
 
idx_t mask
 

Detailed Description

Remove ids from a set. Repetitions of ids in the indices set passed to the constructor does not hurt performance. The hash function used for the bloom filter and GCC's implementation of unordered_set are just the least significant bits of the id. This works fine for random ids or ids in sequences but will produce many hash collisions if lsb's are always the same

Definition at line 76 of file AuxIndexStructures.h.


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