<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * This source code is licensed under the BSD+Patents license found in the</span></div>
<divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> * LICENSE file in the root directory of this source tree.</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment">// Copyright 2004-present Facebook. All Rights Reserved.</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// -*- c++ -*-</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="comment">/** Inverted file with Product Quantizer encoding. Each residual</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <spanclass="comment"> * vector is encoded as a product quantizer code.</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a9d5373633df7a9bec4de69400b9adeed"> 34</a></span> <spanclass="keywordtype">bool</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#a9d5373633df7a9bec4de69400b9adeed">do_polysemous_training</a>; <spanclass="comment">///< reorder PQ centroids after training?</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a2b14cbb5acb3fc28a4df8fde3f5567cd"> 35</a></span> <spanclass="comment"></span><aclass="code"href="structfaiss_1_1PolysemousTraining.html">PolysemousTraining</a> *<aclass="code"href="structfaiss_1_1IndexIVFPQ.html#a2b14cbb5acb3fc28a4df8fde3f5567cd">polysemous_training</a>; <spanclass="comment">///< if NULL, use default</span></div>
<divclass="line"><aname="l00038"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a7430fc4fa030c96497abced3b68358d4"> 38</a></span> <spanclass="keywordtype">size_t</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#a7430fc4fa030c96497abced3b68358d4">scan_table_threshold</a>; <spanclass="comment">///< use table computation or on-the-fly?</span></div>
<divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span> <spanclass="keywordtype">size_t</span> M, <spanclass="keywordtype">size_t</span> nbits_per_idx);</div>
<divclass="line"><aname="l00055"></a><spanclass="lineno"> 55</span> <spanclass="comment"> /// - use precomputed list numbers if precomputed_idx != NULL</span></div>
<divclass="line"><aname="l00056"></a><spanclass="lineno"> 56</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#ac0cb8421b9885d691696d2ff4f76894b">add_core_o</a> (<aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> *x,</div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="comment"> /// same as train_residual, also output 2nd level residuals</span></div>
<divclass="line"><aname="l00064"></a><spanclass="lineno"> 64</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#a4e06f04853dcb424dc393de5f641e917">train_residual_o</a> (<aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> *x, <spanclass="keywordtype">float</span> *residuals_2);</div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment"> * the duplicates are returned in pre-allocated arrays (see the</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> * max sizes).</span></div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"> 74</span> <spanclass="comment"> * @params lims limits between groups of duplicates</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"> 76</span> <spanclass="comment"> * @params ids ids[lims[i]] : ids[lims[i+1]-1] is a group of</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment">// map a vector to a binary code knowning the index</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"> 87</span> <spanclass="comment"> * @param n nb vectors to encode</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment"> * @param keys posting list ids for those vectors (size n)</span></div>
<divclass="line"><aname="l00089"></a><spanclass="lineno"> 89</span> <spanclass="comment"> * @param x vectors (size n * d)</span></div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"> 116</span> <spanclass="comment">/// statistics are robust to internal threading, but not if</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment">/// IndexIVFPQ::search_preassigned is called by multiple threads</span></div>
<divclass="line"><aname="l00119"></a><spanclass="lineno"> 119</span> <spanclass="keywordtype">size_t</span> nq; <spanclass="comment">// nb of queries run</span></div>
<divclass="line"><aname="l00120"></a><spanclass="lineno"> 120</span> <spanclass="keywordtype">size_t</span> nlist; <spanclass="comment">// nb of inverted lists scanned</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="keywordtype">size_t</span> ncode; <spanclass="comment">// nb of codes visited</span></div>
<divclass="line"><aname="l00122"></a><spanclass="lineno"> 122</span> <spanclass="keywordtype">size_t</span> nrefine; <spanclass="comment">// nb of refines (IVFPQR)</span></div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"> 125</span> <spanclass="comment">// nb of passed Hamming distance tests (for polysemous)</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="keywordtype">size_t</span> refine_cycles; <spanclass="comment">// only for IVFPQR</span></div>
<divclass="line"><aname="l00133"></a><spanclass="lineno"> 133</span> <spanclass="comment">// single thread (double-counted with search_cycles)</span></div>
<divclass="line"><aname="l00148"></a><spanclass="lineno"> 148</span> <spanclass="comment">/** Index with an additional level of PQ refinement */</span></div>
<divclass="line"><aname="l00153"></a><spanclass="lineno"> 153</span> <spanclass="comment"> /// factor between k requested in search and the k requested from the IVFPQ</span></div>
<divclass="line"><aname="l00158"></a><spanclass="lineno"> 158</span> <spanclass="keywordtype">size_t</span> M, <spanclass="keywordtype">size_t</span> nbits_per_idx,</div>
<divclass="line"><aname="l00170"></a><spanclass="lineno"> 170</span> <spanclass="comment"> /// same as add_with_ids, but optionally use the precomputed list ids</span></div>
<divclass="line"><aname="l00171"></a><spanclass="lineno"> 171</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexIVFPQR.html#a186b746f22b65ddf416b1e821b0866ec">add_core</a> (<aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> *x, <spanclass="keyword">const</span><spanclass="keywordtype">long</span> *xids,</div>
<divclass="line"><aname="l00190"></a><spanclass="lineno"> 190</span> <spanclass="comment">/** Index with 32-bit ids and flat tables. Must be constructed from an</span></div>
<divclass="line"><aname="l00191"></a><spanclass="lineno"> 191</span> <spanclass="comment"> * exisiting IndexIVFPQ. Cannot be copy-constructed/assigned. The</span></div>
<divclass="line"><aname="l00192"></a><spanclass="lineno"> 192</span> <spanclass="comment"> * actual data is stored in the compact_* tables, the ids and codes</span></div>
<divclass="line"><aname="l00193"></a><spanclass="lineno"> 193</span> <spanclass="comment"> * tables are not used. */</span></div>
<divclass="line"><aname="l00198"></a><spanclass="lineno"> 198</span> <spanclass="comment"> /// how were the compact tables allocated?</span></div>
<divclass="line"><aname="l00200"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70a3d58d7b26146791f0fe34b35a9b0fd95"> 200</a></span> <aclass="code"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70a3d58d7b26146791f0fe34b35a9b0fd95">Alloc_type_none</a>, <spanclass="comment">///< alloc from outside</span></div>
<divclass="line"><aname="l00201"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70acf2d6ba8878a2778383adc32593ba8e6"> 201</a></span> <spanclass="comment"></span><aclass="code"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70acf2d6ba8878a2778383adc32593ba8e6">Alloc_type_new</a>, <spanclass="comment">///< was allocated with new</span></div>
<divclass="line"><aname="l00202"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70a38c1b1ed9ebdbd4b0047be13080094bb"> 202</a></span> <spanclass="comment"></span><aclass="code"href="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70a38c1b1ed9ebdbd4b0047be13080094bb">Alloc_type_mmap</a><spanclass="comment">///< was mmapped</span></div>
<divclass="line"><aname="l00211"></a><spanclass="lineno"> 211</span> <spanclass="comment">// file and buffer this was mmapped (will be unmapped when object</span></div>
<divclass="line"><aname="l00212"></a><spanclass="lineno"> 212</span> <spanclass="comment">// is deleted)</span></div>
<divclass="line"><aname="l00222"></a><spanclass="lineno"> 222</span> <spanclass="comment"> /// the three following functions will fail at runtime</span></div>
<divclass="line"><aname="l00234"></a><spanclass="lineno"> 234</span> <spanclass="comment">/** Same as an IndexIVFPQ without the inverted lists: codes are stored sequentially</span></div>
<divclass="line"><aname="l00236"></a><spanclass="lineno"> 236</span> <spanclass="comment"> * The class is mainly inteded to store encoded vectors that can be</span></div>
<divclass="line"><aname="l00237"></a><spanclass="lineno"> 237</span> <spanclass="comment"> * accessed randomly, the search function is not implemented.</span></div>
<divclass="line"><aname="l00249"></a><spanclass="lineno"> 249</span> <spanclass="comment"> /// size of the code for the first level (ceil(log8(q1.nlist)))</span></div>
<divclass="line"><aname="l00282"></a><spanclass="lineno"> 282</span> <spanclass="comment"> /// transfer the flat codes to an IVFPQ index</span></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_a8692273ff51ab7f34748c3d5b3295216"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#a8692273ff51ab7f34748c3d5b3295216">faiss::Index2Layer::transfer_to_IVFPQ</a></div><divclass="ttdeci">void transfer_to_IVFPQ(IndexIVFPQ &other) const </div><divclass="ttdoc">transfer the flat codes to an IVFPQ index </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01416">IndexIVFPQ.cpp:1416</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_ad47e3c6493d54c2b83f1120b480d20f3"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#ad47e3c6493d54c2b83f1120b480d20f3">faiss::Index2Layer::code_size_2</a></div><divclass="ttdeci">size_t code_size_2</div><divclass="ttdoc">size of the code for the second level </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00253">IndexIVFPQ.h:253</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_a83aa33ae77eb80f6564992e250abcf41"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#a83aa33ae77eb80f6564992e250abcf41">faiss::IndexIVFPQR::reconstruct_from_offset</a></div><divclass="ttdeci">void reconstruct_from_offset(long list_no, long offset, float *recons) const override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01235">IndexIVFPQ.cpp:1235</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_ade7b46bbbcaf244ad680104380afb1b8"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#ade7b46bbbcaf244ad680104380afb1b8">faiss::IndexIVFPQCompact::add</a></div><divclass="ttdeci">void add(idx_t, const float *) override</div><divclass="ttdoc">the three following functions will fail at runtime </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01546">IndexIVFPQ.cpp:1546</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_a12e446dbca14688c37e038c98972ef4e"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#a12e446dbca14688c37e038c98972ef4e">faiss::Index2Layer::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01447">IndexIVFPQ.cpp:1447</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index_html_a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c"><divclass="ttname"><ahref="structfaiss_1_1Index.html#a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c">faiss::Index::assign</a></div><divclass="ttdeci">void assign(idx_t n, const float *x, idx_t *labels, idx_t k=1)</div><divclass="ttdef"><b>Definition:</b><ahref="Index_8cpp_source.html#l00034">Index.cpp:34</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_a68ed7cae5bec89fcdcb6a1d2addbd5a8"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#a68ed7cae5bec89fcdcb6a1d2addbd5a8">faiss::IndexIVFPQR::train_residual</a></div><divclass="ttdeci">void train_residual(idx_t n, const float *x) override</div><divclass="ttdoc">trains the two product quantizers </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01109">IndexIVFPQ.cpp:1109</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_a186b746f22b65ddf416b1e821b0866ec"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#a186b746f22b65ddf416b1e821b0866ec">faiss::IndexIVFPQR::add_core</a></div><divclass="ttdeci">void add_core(idx_t n, const float *x, const long *xids, const long *precomputed_idx=nullptr)</div><divclass="ttdoc">same as add_with_ids, but optionally use the precomputed list ids </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01133">IndexIVFPQ.cpp:1133</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a3093a0a3e128eafce6e0583b75e9662e"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e">faiss::IndexIVFPQ::polysemous_ht</a></div><divclass="ttdeci">int polysemous_ht</div><divclass="ttdoc">Hamming thresh for polysemous filtering. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00039">IndexIVFPQ.h:39</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_ae0e979a014a9defe2254e9543657b075"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#ae0e979a014a9defe2254e9543657b075">faiss::IndexIVFPQR::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01100">IndexIVFPQ.cpp:1100</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a981c2748bfbd9b018494f119279a0342"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a981c2748bfbd9b018494f119279a0342">faiss::IndexIVFPQ::add_with_ids</a></div><divclass="ttdeci">void add_with_ids(idx_t n, const float *x, const long *xids=nullptr) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00185">IndexIVFPQ.cpp:185</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVF_html_af16d325f5bef22b2e5f90ceea796e80d"><divclass="ttname"><ahref="structfaiss_1_1IndexIVF.html#af16d325f5bef22b2e5f90ceea796e80d">faiss::IndexIVF::ids</a></div><divclass="ttdeci">std::vector< std::vector< long >> ids</div><divclass="ttdoc">Inverted lists for indexes. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVF_8h_source.html#l00081">IndexIVF.h:81</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_ab2698c5d65644a171c53ffe39e420b70"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70">faiss::IndexIVFPQCompact::Alloc_type_t</a></div><divclass="ttdeci">Alloc_type_t</div><divclass="ttdoc">how were the compact tables allocated? </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00199">IndexIVFPQ.h:199</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a1ae6cdd996bbd398fa4e87646c8f3ba6"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a1ae6cdd996bbd398fa4e87646c8f3ba6">faiss::IndexIVFPQ::encode_multiple</a></div><divclass="ttdeci">void encode_multiple(size_t n, long *keys, const float *x, uint8_t *codes, bool compute_keys=false) const </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00149">IndexIVFPQ.cpp:149</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_a0ef8132fae22a50616fe1201c8b20588"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#a0ef8132fae22a50616fe1201c8b20588">faiss::IndexIVFPQCompact::train</a></div><divclass="ttdeci">void train(idx_t, const float *) override</div><divclass="ttdoc">Trains the quantizer and calls train_residual to train sub-quantizers. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01554">IndexIVFPQ.cpp:1554</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index_html_a040c6aed1f224f3ea7bf58eebc0c31a4"><divclass="ttname"><ahref="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">faiss::Index::idx_t</a></div><divclass="ttdeci">long idx_t</div><divclass="ttdoc">all indices are this type </div><divclass="ttdef"><b>Definition:</b><ahref="Index_8h_source.html#l00062">Index.h:62</a></div></div>
<divclass="ttc"id="structfaiss_1_1PolysemousTraining_html"><divclass="ttname"><ahref="structfaiss_1_1PolysemousTraining.html">faiss::PolysemousTraining</a></div><divclass="ttdoc">optimizes the order of indices in a ProductQuantizer </div><divclass="ttdef"><b>Definition:</b><ahref="PolysemousTraining_8h_source.html#l00125">PolysemousTraining.h:125</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_ab2698c5d65644a171c53ffe39e420b70a3d58d7b26146791f0fe34b35a9b0fd95"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70a3d58d7b26146791f0fe34b35a9b0fd95">faiss::IndexIVFPQCompact::Alloc_type_none</a></div><divclass="ttdoc">alloc from outside </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00200">IndexIVFPQ.h:200</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a007303be116c8da65b6d058e3fc77d16"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a007303be116c8da65b6d058e3fc77d16">faiss::IndexIVFPQ::pq</a></div><divclass="ttdeci">ProductQuantizer pq</div><divclass="ttdoc">produces the codes </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00032">IndexIVFPQ.h:32</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_a735b2b6cc50e4186776a8213d2679837"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#a735b2b6cc50e4186776a8213d2679837">faiss::Index2Layer::code_size_1</a></div><divclass="ttdeci">size_t code_size_1</div><divclass="ttdoc">size of the code for the first level (ceil(log8(q1.nlist))) </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00250">IndexIVFPQ.h:250</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_ac0cb8421b9885d691696d2ff4f76894b"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#ac0cb8421b9885d691696d2ff4f76894b">faiss::IndexIVFPQ::add_core_o</a></div><divclass="ttdeci">void add_core_o(idx_t n, const float *x, const long *xids, float *residuals_2, const long *precomputed_idx=nullptr)</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00191">IndexIVFPQ.cpp:191</a></div></div>
<divclass="ttc"id="structfaiss_1_1Level1Quantizer_html_a3cf99e2ee92b8558a066f821efab95d5"><divclass="ttname"><ahref="structfaiss_1_1Level1Quantizer.html#a3cf99e2ee92b8558a066f821efab95d5">faiss::Level1Quantizer::quantizer</a></div><divclass="ttdeci">Index * quantizer</div><divclass="ttdoc">quantizer that maps vectors to inverted lists </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVF_8h_source.html#l00033">IndexIVF.h:33</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_a8f5eccfb4d5e4098ff6c00acb3bc40a1"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#a8f5eccfb4d5e4098ff6c00acb3bc40a1">faiss::IndexIVFPQCompact::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01550">IndexIVFPQ.cpp:1550</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_ab90d1de73cbc705a347cfc852ded6006"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#ab90d1de73cbc705a347cfc852ded6006">faiss::Index2Layer::pq</a></div><divclass="ttdeci">ProductQuantizer pq</div><divclass="ttdoc">second level quantizer is always a PQ </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00244">IndexIVFPQ.h:244</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQCompact_html_ab2698c5d65644a171c53ffe39e420b70acf2d6ba8878a2778383adc32593ba8e6"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQCompact.html#ab2698c5d65644a171c53ffe39e420b70acf2d6ba8878a2778383adc32593ba8e6">faiss::IndexIVFPQCompact::Alloc_type_new</a></div><divclass="ttdoc">was allocated with new </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00201">IndexIVFPQ.h:201</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_a4b6154a5194d574d037ba78c137a2fa5"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#a4b6154a5194d574d037ba78c137a2fa5">faiss::IndexIVFPQR::add_with_ids</a></div><divclass="ttdeci">void add_with_ids(idx_t n, const float *x, const long *xids) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01129">IndexIVFPQ.cpp:1129</a></div></div>
<divclass="ttc"id="structfaiss_1_1Level1Quantizer_html_a1c4fc9d874d9492ee0ea27a5be388fa7"><divclass="ttname"><ahref="structfaiss_1_1Level1Quantizer.html#a1c4fc9d874d9492ee0ea27a5be388fa7">faiss::Level1Quantizer::nlist</a></div><divclass="ttdeci">size_t nlist</div><divclass="ttdoc">number of possible key values </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVF_8h_source.html#l00034">IndexIVF.h:34</a></div></div>
<divclass="ttc"id="namespacefaiss_html_afd12191c638da74760ff397cf319752c"><divclass="ttname"><ahref="namespacefaiss.html#afd12191c638da74760ff397cf319752c">faiss::MetricType</a></div><divclass="ttdeci">MetricType</div><divclass="ttdoc">Some algorithms support both an inner product version and a L2 search version. </div><divclass="ttdef"><b>Definition:</b><ahref="Index_8h_source.html#l00043">Index.h:43</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQR_html_a0b02a4151ceacc070352f8b15cc0ee0b"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQR.html#a0b02a4151ceacc070352f8b15cc0ee0b">faiss::IndexIVFPQR::k_factor</a></div><divclass="ttdeci">float k_factor</div><divclass="ttdoc">factor between k requested in search and the k requested from the IVFPQ </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00154">IndexIVFPQ.h:154</a></div></div>