<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="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="l00060"></a><spanclass="lineno"> 60</span> <spanclass="comment">/** same as IndexIDMap but also provides an efficient reconstruction</span></div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment"> implementation via a 2-way index */</span></div>
<divclass="line"><aname="l00082"></a><spanclass="lineno"> 82</span> <spanclass="comment">/** Index that concatenates the results from several sub-indexes</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="keywordtype">bool</span> own_fields; <spanclass="comment">/// should the sub-indexes be deleted along with this?</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"> * @param threaded do we use one thread per sub_index or do</span></div>
<divclass="line"><aname="l00095"></a><spanclass="lineno"> 95</span> <spanclass="comment"> * @param successive_ids should we shift the returned ids by</span></div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment"> * the size of each sub-index or return them</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"> * as they are?</span></div>
<divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment">// update metric_type and ntotal. Call if you changes something in</span></div>
<divclass="line"><aname="l00105"></a><spanclass="lineno"> 105</span> <spanclass="comment">// the shard indexes.</span></div>
<divclass="line"><aname="l00110"></a><spanclass="lineno"> 110</span> <spanclass="comment"> /// supported only for sub-indices that implement add_with_ids</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"> 111</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexShards.html#a2e06889521c566525011eb46cc97cda6">add</a>(idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"> 115</span> <spanclass="comment"> * - true, non-NULL ERROR: it makes no sense to pass in ids and</span></div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"> 116</span> <spanclass="comment"> * request them to be shifted</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> * - true, NULL OK, but should be called only once (calls add()</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"> 118</span> <spanclass="comment"> * on sub-indexes).</span></div>
<divclass="line"><aname="l00119"></a><spanclass="lineno"> 119</span> <spanclass="comment"> * - false, non-NULL OK: will call add_with_ids with passed in xids</span></div>
<divclass="line"><aname="l00120"></a><spanclass="lineno"> 120</span> <spanclass="comment"> * distributed evenly over shards</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="comment"> * - false, NULL OK: will call add_with_ids on each sub-index,</span></div>
<divclass="line"><aname="l00122"></a><spanclass="lineno"> 122</span> <spanclass="comment"> * starting at ntotal</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"> 140</span> <spanclass="comment">/** splits input vectors in segments and assigns each segment to a sub-index</span></div>
<divclass="line"><aname="l00141"></a><spanclass="lineno"> 141</span> <spanclass="comment"> * used to distribute a MultiIndexQuantizer</span></div>
<divclass="line"><aname="l00148"></a><spanclass="lineno"> 148</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#l00428">MetaIndexes.cpp:428</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#l00144">MetaIndexes.cpp:144</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#l00718">MetaIndexes.cpp:718</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#l00039">MetaIndexes.cpp:39</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#l00714">MetaIndexes.cpp:714</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#l00422">MetaIndexes.cpp:422</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#l00064">Index.h:64</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#l00153">MetaIndexes.cpp:153</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#l00613">MetaIndexes.cpp:613</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#l00162">MetaIndexes.cpp:162</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#l00089">MetaIndexes.h:89</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#l00481">MetaIndexes.cpp:481</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#l00052">MetaIndexes.cpp:52</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#l00583">MetaIndexes.cpp:583</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>