#include <IVFlib.h>
Public Member Functions | |
SlidingIndexWindow (Index *index) | |
index should be initially empty and trained | |
void | step (const Index *sub_index, bool remove_oldest) |
Public Attributes | |
Index * | index |
common index that contains the sliding window | |
ArrayInvertedLists * | ils |
InvertedLists of index. | |
int | n_slice |
number of slices currently in index | |
size_t | nlist |
same as index->nlist | |
std::vector< std::vector < size_t > > | sizes |
cumulative list sizes at each slice | |
A set of IndexIVFs concatenated together in a FIFO fashion. at each "step", the oldest index slice is removed and a new index is added.
void faiss::ivflib::SlidingIndexWindow::step | ( | const Index * | sub_index, |
bool | remove_oldest | ||
) |
Add one index to the current index and remove the oldest one.
sub_index | slice to swap in (can be NULL) |
remove_oldest | if true, remove the oldest slices |
Definition at line 191 of file IVFlib.cpp.