<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="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">/** Index that translates search results to ids */</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> <aclass="code"href="structfaiss_1_1Index.html">Index</a> * index; <spanclass="comment">///! the sub-index</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb"> 28</a></span> <spanclass="comment"></span><spanclass="keywordtype">bool</span><aclass="code"href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb">own_fields</a>; <spanclass="comment">///! whether pointers are deleted in destructo</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> /// Same as add_core, but stores xids instead of sequential ids</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</span> <spanclass="comment"> /// @param xids if non-null, ids to store for the vectors (size n)</span></div>
<divclass="line"><aname="l00035"></a><spanclass="lineno"> 35</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexIDMap.html#aeace75e53648c052d05c357b744e090b">add_with_ids</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) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment">/** same as IndexIDMap but also provides an efficient reconstruction</span></div>
<divclass="line"><aname="l00062"></a><spanclass="lineno"> 62</span> <spanclass="comment"> implementation via a 2-way index */</span></div>
<divclass="line"><aname="l00083"></a><spanclass="lineno"> 83</span> <spanclass="comment">/** Index that concatenates the results from several sub-indexes</span></div>
<divclass="line"><aname="l00089"></a><spanclass="lineno"> 89</span> <spanclass="keywordtype">bool</span> own_fields; <spanclass="comment">/// should the sub-indexes be deleted along with this?</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"> 94</span> <spanclass="comment"> * @param threaded do we use one thread per sub_index or do</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment"> * @param successive_ids should we shift the returned ids by</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"> * the size of each sub-index or return them</span></div>
<divclass="line"><aname="l00098"></a><spanclass="lineno"> 98</span> <spanclass="comment"> * as they are?</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment">// update metric_type and ntotal. Call if you changes something in</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"> 106</span> <spanclass="comment">// the shard indexes.</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment"> /// supported only for sub-indices that implement add_with_ids</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"> 112</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexShards.html#a2e06889521c566525011eb46cc97cda6">add</a>(<aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00130"></a><spanclass="lineno"> 130</span> <spanclass="comment">/** splits input vectors in segments and assigns each segment to a sub-index</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="comment"> * used to distribute a MultiIndexQuantizer</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"> 138</span> <aclass="code"href="structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4">idx_t</a> sum_d; <spanclass="comment">/// sum of dimensions seen so far</span></div>
<divclass="ttc"id="structfaiss_1_1IndexShards_html_a1f771d50133494f682f05c9ab9e39ad9"><divclass="ttname"><ahref="structfaiss_1_1IndexShards.html#a1f771d50133494f682f05c9ab9e39ad9">faiss::IndexShards::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="MetaIndexes_8cpp_source.html#l00437">MetaIndexes.cpp:437</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap2_html_a33ff76975891695c2fa45ed26fc8eae9"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap2.html#a33ff76975891695c2fa45ed26fc8eae9">faiss::IndexIDMap2::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="MetaIndexes_8cpp_source.html#l00142">MetaIndexes.cpp:142</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexSplitVectors_html_a8047981cb8d10c54107664c4955df402"><divclass="ttname"><ahref="structfaiss_1_1IndexSplitVectors.html#a8047981cb8d10c54107664c4955df402">faiss::IndexSplitVectors::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00727">MetaIndexes.cpp:727</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap_html_a16cce6c1e83d0d5f069c9b0399896450"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap.html#a16cce6c1e83d0d5f069c9b0399896450">faiss::IndexIDMap::add</a></div><divclass="ttdeci">void add(idx_t n, const float *x) override</div><divclass="ttdoc">this will fail. Use add_with_ids </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00040">MetaIndexes.cpp:40</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap_html_ad1cc5658f1879f6a2b00d76cca58cf3b"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap.html#ad1cc5658f1879f6a2b00d76cca58cf3b">faiss::IndexIDMap::id_map</a></div><divclass="ttdeci">std::vector< long > id_map</div><divclass="ttdoc">! whether pointers are deleted in destructo </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8h_source.html#l00029">MetaIndexes.h:29</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexSplitVectors_html_aafa4c780e325855fe247052453967845"><divclass="ttname"><ahref="structfaiss_1_1IndexSplitVectors.html#aafa4c780e325855fe247052453967845">faiss::IndexSplitVectors::train</a></div><divclass="ttdeci">void train(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00723">MetaIndexes.cpp:723</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexShards_html_a2e06889521c566525011eb46cc97cda6"><divclass="ttname"><ahref="structfaiss_1_1IndexShards.html#a2e06889521c566525011eb46cc97cda6">faiss::IndexShards::add</a></div><divclass="ttdeci">void add(idx_t n, const float *x) override</div><divclass="ttdoc">supported only for sub-indices that implement add_with_ids </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00420">MetaIndexes.cpp:420</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_1IndexIDMap2_html_a646302669189e370d9d864fc18f096fe"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap2.html#a646302669189e370d9d864fc18f096fe">faiss::IndexIDMap2::construct_rev_map</a></div><divclass="ttdeci">void construct_rev_map()</div><divclass="ttdoc">make the rev_map from scratch </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00151">MetaIndexes.cpp:151</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexSplitVectors_html_af2ef88dc72b4a94f1190ecc8cb25881b"><divclass="ttname"><ahref="structfaiss_1_1IndexSplitVectors.html#af2ef88dc72b4a94f1190ecc8cb25881b">faiss::IndexSplitVectors::add</a></div><divclass="ttdeci">void add(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00622">MetaIndexes.cpp:622</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap2_html_a87e313ebc8dd62fb734a61a6d95a98f0"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap2.html#a87e313ebc8dd62fb734a61a6d95a98f0">faiss::IndexIDMap2::remove_ids</a></div><divclass="ttdeci">long remove_ids(const IDSelector &sel) override</div><divclass="ttdoc">remove ids adapted to IndexFlat </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00160">MetaIndexes.cpp:160</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexShards_html_a493da171720f2c3f35058f793fb9a6ce"><divclass="ttname"><ahref="structfaiss_1_1IndexShards.html#a493da171720f2c3f35058f793fb9a6ce">faiss::IndexShards::threaded</a></div><divclass="ttdeci">bool threaded</div><divclass="ttdoc">should the sub-indexes be deleted along with this? </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8h_source.html#l00090">MetaIndexes.h:90</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexShards_html_aa7dc5d020de4a0552058cbf2844cb00f"><divclass="ttname"><ahref="structfaiss_1_1IndexShards.html#aa7dc5d020de4a0552058cbf2844cb00f">faiss::IndexShards::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00490">MetaIndexes.cpp:490</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap_html_a70aca5b0f665c5a109d5dadf1e13b448"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap.html#a70aca5b0f665c5a109d5dadf1e13b448">faiss::IndexIDMap::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00053">MetaIndexes.cpp:53</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap_html_aeace75e53648c052d05c357b744e090b"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap.html#aeace75e53648c052d05c357b744e090b">faiss::IndexIDMap::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="MetaIndexes_8cpp_source.html#l00060">MetaIndexes.cpp:60</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexSplitVectors_html_a70ba3367a08722fe4466dc49c21a4d2b"><divclass="ttname"><ahref="structfaiss_1_1IndexSplitVectors.html#a70ba3367a08722fe4466dc49c21a4d2b">faiss::IndexSplitVectors::IndexSplitVectors</a></div><divclass="ttdeci">IndexSplitVectors(idx_t d, bool threaded=false)</div><divclass="ttdoc">sum of dimensions seen so far </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8cpp_source.html#l00592">MetaIndexes.cpp:592</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexIDMap_html_affa8a764304410c96489c2b2e178bcdb"><divclass="ttname"><ahref="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb">faiss::IndexIDMap::own_fields</a></div><divclass="ttdeci">bool own_fields</div><divclass="ttdoc">! the sub-index </div><divclass="ttdef"><b>Definition:</b><ahref="MetaIndexes_8h_source.html#l00028">MetaIndexes.h:28</a></div></div>