<divclass="line"><aname="l00002"></a><spanclass="lineno"> 2</span> <spanclass="comment"> * Copyright (c) Facebook, Inc. and its affiliates.</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment"> * This source code is licensed under the MIT license found in the</span></div>
<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * LICENSE file in the root directory of this source tree.</span></div>
<divclass="line"><aname="l00023"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IVFPQSearchParameters.html#a5537033b0fe6cf3ef8334a16de7a47d5"> 23</a></span> <spanclass="keywordtype">size_t</span><aclass="code"href="structfaiss_1_1IVFPQSearchParameters.html#a5537033b0fe6cf3ef8334a16de7a47d5">scan_table_threshold</a>; <spanclass="comment">///< use table computation or on-the-fly?</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IVFPQSearchParameters.html#a66ff24d0f4fd606488ded44354a8a6cf"> 24</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1IVFPQSearchParameters.html#a66ff24d0f4fd606488ded44354a8a6cf">polysemous_ht</a>; <spanclass="comment">///< Hamming thresh for polysemous filtering</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> <spanclass="comment">/** Inverted file with Product Quantizer encoding. Each residual</span></div>
<divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> * vector is encoded as a product quantizer code.</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a9d5373633df7a9bec4de69400b9adeed"> 39</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="l00040"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a2b14cbb5acb3fc28a4df8fde3f5567cd"> 40</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="l00043"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a7430fc4fa030c96497abced3b68358d4"> 43</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="l00044"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e"> 44</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e">polysemous_ht</a>; <spanclass="comment">///< Hamming thresh for polysemous filtering</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment"> /** Precompute table that speed up query preprocessing at some</span></div>
<divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span> <spanclass="comment"> * =-1: force disable</span></div>
<divclass="line"><aname="l00049"></a><spanclass="lineno"> 49</span> <spanclass="comment"> * =0: decide heuristically (default: use tables only if they are</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment"> * =1: tables that work for all quantizers (size 256 * nlist * M)</span></div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"> 52</span> <spanclass="comment"> * =2: specific version for MultiIndexQuantizer (much more compact)</span></div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="keywordtype">size_t</span> M, <spanclass="keywordtype">size_t</span> nbits_per_idx);</div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexIVFPQ.html#aaeddd125680a8d5347c0b58565b6b511">encode_vectors</a>(<aclass="code"href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x,</div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"> 74</span> <spanclass="comment"> /// - use precomputed list numbers if precomputed_idx != NULL</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"> 75</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#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> *x,</div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment"> /// same as train_residual, also output 2nd level residuals</span></div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</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#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> *x, <spanclass="keywordtype">float</span> *residuals_2);</div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"> 90</span> <spanclass="comment"> * the duplicates are returned in pre-allocated arrays (see the</span></div>
<divclass="line"><aname="l00091"></a><spanclass="lineno"> 91</span> <spanclass="comment"> * max sizes).</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"> * @params lims limits between groups of duplicates</span></div>
<divclass="line"><aname="l00095"></a><spanclass="lineno"> 95</span> <spanclass="comment"> * @params ids ids[lims[i]] : ids[lims[i+1]-1] is a group of</span></div>
<divclass="line"><aname="l00101"></a><spanclass="lineno"> 101</span> <spanclass="comment">// map a vector to a binary code knowning the index</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment"> * @param n nb vectors to encode</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"> 107</span> <spanclass="comment"> * @param keys posting list ids for those vectors (size n)</span></div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"> 108</span> <spanclass="comment"> * @param x vectors (size n * d)</span></div>
<divclass="line"><aname="l00132"></a><spanclass="lineno"> 132</span> <spanclass="comment">/// statistics are robust to internal threading, but not if</span></div>
<divclass="line"><aname="l00133"></a><spanclass="lineno"> 133</span> <spanclass="comment">/// IndexIVFPQ::search_preassigned is called by multiple threads</span></div>
<divclass="line"><aname="l00135"></a><spanclass="lineno"> 135</span> <spanclass="keywordtype">size_t</span> nrefine; <spanclass="comment">// nb of refines (IVFPQR)</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"> 138</span> <spanclass="comment">// nb of passed Hamming distance tests (for polysemous)</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"> 143</span> <spanclass="keywordtype">size_t</span> refine_cycles; <spanclass="comment">// only for IVFPQR</span></div>
<divclass="line"><aname="l00154"></a><spanclass="lineno"> 154</span> <spanclass="comment">/** Index with an additional level of PQ refinement */</span></div>
<divclass="line"><aname="l00159"></a><spanclass="lineno"> 159</span> <spanclass="comment"> /// factor between k requested in search and the k requested from the IVFPQ</span></div>
<divclass="line"><aname="l00164"></a><spanclass="lineno"> 164</span> <spanclass="keywordtype">size_t</span> M, <spanclass="keywordtype">size_t</span> nbits_per_idx,</div>
<divclass="line"><aname="l00176"></a><spanclass="lineno"> 176</span> <spanclass="comment"> /// same as add_with_ids, but optionally use the precomputed list ids</span></div>
<divclass="line"><aname="l00177"></a><spanclass="lineno"> 177</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#ad3f0d3071f987baabbdd3da4500c87ea">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="l00199"></a><spanclass="lineno"> 199</span> <spanclass="comment">/** Same as an IndexIVFPQ without the inverted lists: codes are stored sequentially</span></div>
<divclass="line"><aname="l00201"></a><spanclass="lineno"> 201</span> <spanclass="comment"> * The class is mainly inteded to store encoded vectors that can be</span></div>
<divclass="line"><aname="l00202"></a><spanclass="lineno"> 202</span> <spanclass="comment"> * accessed randomly, the search function is not implemented.</span></div>
<divclass="line"><aname="l00214"></a><spanclass="lineno"> 214</span> <spanclass="comment"> /// size of the code for the first level (ceil(log8(q1.nlist)))</span></div>
<divclass="line"><aname="l00247"></a><spanclass="lineno"> 247</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#l01518">IndexIVFPQ.cpp:1518</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#l00218">IndexIVFPQ.h:218</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#l01338">IndexIVFPQ.cpp:1338</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#l01545">IndexIVFPQ.cpp:1545</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_1IndexIVFPQ_html_ae1fb0cc3051dec8e322a78c443f8fc9a"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#ae1fb0cc3051dec8e322a78c443f8fc9a">faiss::IndexIVFPQ::decode_multiple</a></div><divclass="ttdeci">void decode_multiple(size_t n, const long *keys, const uint8_t *xcodes, float *x) const </div><divclass="ttdoc">inverse of encode_multiple </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00159">IndexIVFPQ.cpp:159</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a4e06f04853dcb424dc393de5f641e917"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a4e06f04853dcb424dc393de5f641e917">faiss::IndexIVFPQ::train_residual_o</a></div><divclass="ttdeci">void train_residual_o(idx_t n, const float *x, float *residuals_2)</div><divclass="ttdoc">same as train_residual, also output 2nd level residuals </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00066">IndexIVFPQ.cpp:66</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a9d5373633df7a9bec4de69400b9adeed"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a9d5373633df7a9bec4de69400b9adeed">faiss::IndexIVFPQ::do_polysemous_training</a></div><divclass="ttdeci">bool do_polysemous_training</div><divclass="ttdoc">reorder PQ centroids after training? </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00039">IndexIVFPQ.h:39</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a7430fc4fa030c96497abced3b68358d4"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a7430fc4fa030c96497abced3b68358d4">faiss::IndexIVFPQ::scan_table_threshold</a></div><divclass="ttdeci">size_t scan_table_threshold</div><divclass="ttdoc">use table computation or on-the-fly? </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00043">IndexIVFPQ.h:43</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#l01207">IndexIVFPQ.cpp:1207</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#l01231">IndexIVFPQ.cpp:1231</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#l00044">IndexIVFPQ.h:44</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a694b699dd3512d83743d717e489bd48c"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a694b699dd3512d83743d717e489bd48c">faiss::IndexIVFPQ::get_InvertedListScanner</a></div><divclass="ttdeci">InvertedListScanner * get_InvertedListScanner(bool store_pairs) const override</div><divclass="ttdoc">get a scanner for this index (store_pairs means ignore labels) </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01094">IndexIVFPQ.cpp:1094</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#l01198">IndexIVFPQ.cpp:1198</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="ttdoc">default implementation that calls encode_vectors </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00182">IndexIVFPQ.cpp:182</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index_html_ad3f0d3071f987baabbdd3da4500c87ea"><divclass="ttname"><ahref="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">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_1IndexIVFPQ_html_af6565a5d8bab7be3df19c50d235bd662"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#af6565a5d8bab7be3df19c50d235bd662">faiss::IndexIVFPQ::train_residual</a></div><divclass="ttdeci">void train_residual(idx_t n, const float *x) override</div><divclass="ttdoc">trains the product quantizer </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l00060">IndexIVFPQ.cpp:60</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a823ae6c4131996815fa4e90c7d1d13f6"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a823ae6c4131996815fa4e90c7d1d13f6">faiss::IndexIVFPQ::precomputed_table_max_bytes</a></div><divclass="ttdeci">static size_t precomputed_table_max_bytes</div><divclass="ttdoc">2G by default, accommodates tables up to PQ32 w/ 65536 centroids </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00055">IndexIVFPQ.h:55</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_a921c6640d3a16bb3608883d8e8948810"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#a921c6640d3a16bb3608883d8e8948810">faiss::IndexIVFPQ::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#l00310">IndexIVFPQ.cpp:310</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_1IVFPQSearchParameters_html_a5537033b0fe6cf3ef8334a16de7a47d5"><divclass="ttname"><ahref="structfaiss_1_1IVFPQSearchParameters.html#a5537033b0fe6cf3ef8334a16de7a47d5">faiss::IVFPQSearchParameters::scan_table_threshold</a></div><divclass="ttdeci">size_t scan_table_threshold</div><divclass="ttdoc">use table computation or on-the-fly? </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00023">IndexIVFPQ.h:23</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_a48cbf519590313f1c6a3dc89c8d0678c"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#a48cbf519590313f1c6a3dc89c8d0678c">faiss::Index2Layer::train</a></div><divclass="ttdeci">void train(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01402">IndexIVFPQ.cpp:1402</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#l00121">PolysemousTraining.h:121</a></div></div>
<divclass="ttc"id="structfaiss_1_1Index2Layer_html_a0aa69e64a2b216a01f99366e8ca4dc7b"><divclass="ttname"><ahref="structfaiss_1_1Index2Layer.html#a0aa69e64a2b216a01f99366e8ca4dc7b">faiss::Index2Layer::add</a></div><divclass="ttdeci">void add(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01440">IndexIVFPQ.cpp:1440</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIVFPQ_html_afd13b471df293ae5a6e895704c69a4c3"><divclass="ttname"><ahref="structfaiss_1_1IndexIVFPQ.html#afd13b471df293ae5a6e895704c69a4c3">faiss::IndexIVFPQ::by_residual</a></div><divclass="ttdeci">bool by_residual</div><divclass="ttdoc">Encode residual or plain vector? </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8h_source.html#l00035">IndexIVFPQ.h:35</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#l00037">IndexIVFPQ.h:37</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#l00215">IndexIVFPQ.h:215</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#l00220">IndexIVFPQ.cpp:220</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#l00032">IndexIVF.h:32</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#l00209">IndexIVFPQ.h:209</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="ttdoc">default implementation that calls encode_vectors </div><divclass="ttdef"><b>Definition:</b><ahref="IndexIVFPQ_8cpp_source.html#l01227">IndexIVFPQ.cpp:1227</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#l00033">IndexIVF.h:33</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#l00044">Index.h:44</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#l00160">IndexIVFPQ.h:160</a></div></div>