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

#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

Indexindex
 common index that contains the sliding window
 
ArrayInvertedListsils
 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
 

Detailed Description

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.

Definition at line 84 of file IVFlib.h.

Member Function Documentation

void faiss::ivflib::SlidingIndexWindow::step ( const Index sub_index,
bool  remove_oldest 
)

Add one index to the current index and remove the oldest one.

Parameters
sub_indexslice to swap in (can be NULL)
remove_oldestif true, remove the oldest slices

Definition at line 191 of file IVFlib.cpp.


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