<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment"> * This source code is licensed under the CC-by-NC 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="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment">/** Index that translates search results to ids */</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <aclass="code"href="structfaiss_1_1Index.html">Index</a> * index; <spanclass="comment">///! the sub-index</span></div>
<divclass="line"><aname="l00027"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb"> 27</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="l00032"></a><spanclass="lineno"> 32</span> <spanclass="comment"> /// Same as add_core, but stores xids instead of sequential ids</span></div>
<divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> <spanclass="comment"> /// @param xids if non-null, ids to store for the vectors (size n)</span></div>
<divclass="line"><aname="l00034"></a><spanclass="lineno"> 34</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="l00057"></a><spanclass="lineno"> 57</span> <spanclass="comment">/** Index that concatenates the results from several sub-indexes</span></div>
<divclass="line"><aname="l00063"></a><spanclass="lineno"> 63</span> <spanclass="keywordtype">bool</span> own_fields; <spanclass="comment">/// should the sub-indexes be deleted along with this?</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment"> * @param threaded do we use one thread per sub_index or do</span></div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"> 70</span> <spanclass="comment"> * @param successive_ids should we shift the returned ids by</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"> 71</span> <spanclass="comment"> * the size of each sub-index or return them</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment"> * as they are?</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment">// update metric_type and ntotal. Call if you changes something in</span></div>
<divclass="line"><aname="l00080"></a><spanclass="lineno"> 80</span> <spanclass="comment">// the shard indexes.</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"> 85</span> <spanclass="comment"> /// supported only for sub-indices that implement add_with_ids</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"> 86</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="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment">/** splits input vectors in segments and assigns each segment to a sub-index</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment"> * used to distribute a MultiIndexQuantizer</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"> 112</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#l00383">MetaIndexes.cpp:383</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#l00676">MetaIndexes.cpp:676</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#l00028">MetaIndexes.h:28</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#l00671">MetaIndexes.cpp:671</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#l00366">MetaIndexes.cpp:366</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_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#l00568">MetaIndexes.cpp:568</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#l00064">MetaIndexes.h:64</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#l00436">MetaIndexes.cpp:436</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#l00538">MetaIndexes.cpp:538</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#l00027">MetaIndexes.h:27</a></div></div>