All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
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

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

## 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_index | slice to swap in (can be NULL)
  remove_oldest | if true, remove the oldest slices

Definition at line 191 of file IVFlib.cpp.

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

- /tmp/faiss/IVFlib.h
- /tmp/faiss/IVFlib.cpp