<divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment"> * This source code is licensed under the CC-by-NC license found in the</span></div>
<divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment"> * LICENSE file in the root directory of this source tree.</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">// Copyright 2004-present Facebook. All Rights Reserved.</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment">// -*- c++ -*-</span></div>
<divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="comment">/** The sign of each vector component is put in a binary signature */</span></div>
<divclass="line"><aname="l00028"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexLSH.html#af8c48006f210f0cbbf45ec9972558d20"> 28</a></span> <spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1IndexLSH.html#af8c48006f210f0cbbf45ec9972558d20">nbits</a>; <spanclass="comment">///< nb of bits per vector</span></div>
<divclass="line"><aname="l00029"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexLSH.html#a0116f529bc5de64a7ef142caa652d9f6"> 29</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1IndexLSH.html#a0116f529bc5de64a7ef142caa652d9f6">bytes_per_vec</a>; <spanclass="comment">///< nb of 8-bits per encoded vector</span></div>
<divclass="line"><aname="l00030"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexLSH.html#a71e9142e1256705f125ded9d647f4497"> 30</a></span> <spanclass="comment"></span><spanclass="keywordtype">bool</span><aclass="code"href="structfaiss_1_1IndexLSH.html#a71e9142e1256705f125ded9d647f4497">rotate_data</a>; <spanclass="comment">///< whether to apply a random rotation to input</span></div>
<divclass="line"><aname="l00031"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexLSH.html#a5d4d6ea1fc709605d5b2061d1bce27d6"> 31</a></span> <spanclass="comment"></span><spanclass="keywordtype">bool</span><aclass="code"href="structfaiss_1_1IndexLSH.html#a5d4d6ea1fc709605d5b2061d1bce27d6">train_thresholds</a>; <spanclass="comment">///< whether we train thresholds or use 0</span></div>
<divclass="line"><aname="l00045"></a><spanclass="lineno"> 45</span> <spanclass="comment"> /** Preprocesses and resizes the input to the size required to</span></div>
<divclass="line"><aname="l00046"></a><spanclass="lineno"> 46</span> <spanclass="comment"> * binarize the data</span></div>
<divclass="line"><aname="l00048"></a><spanclass="lineno"> 48</span> <spanclass="comment"> * @param x input vectors, size n * d</span></div>
<divclass="line"><aname="l00049"></a><spanclass="lineno"> 49</span> <spanclass="comment"> * @return output vectors, size n * bits. May be the same pointer</span></div>
<divclass="line"><aname="l00050"></a><spanclass="lineno"> 50</span> <spanclass="comment"> * as x, otherwise it should be deleted by the caller</span></div>
<divclass="line"><aname="l00068"></a><spanclass="lineno"> 68</span> <spanclass="comment"> /// transfer the thresholds to a pre-processing stage (and unset</span></div>
<divclass="ttc"id="structfaiss_1_1RandomRotationMatrix_html"><divclass="ttname"><ahref="structfaiss_1_1RandomRotationMatrix.html">faiss::RandomRotationMatrix</a></div><divclass="ttdoc">Randomly rotate a set of vectors. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00118">VectorTransform.h:118</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a0116f529bc5de64a7ef142caa652d9f6"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a0116f529bc5de64a7ef142caa652d9f6">faiss::IndexLSH::bytes_per_vec</a></div><divclass="ttdeci">int bytes_per_vec</div><divclass="ttdoc">nb of 8-bits per encoded vector </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00029">IndexLSH.h:29</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_ae203ad895b15ae16fc1a748661b84df3"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#ae203ad895b15ae16fc1a748661b84df3">faiss::IndexLSH::thresholds</a></div><divclass="ttdeci">std::vector< float > thresholds</div><divclass="ttdoc">thresholds to compare with </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00035">IndexLSH.h:35</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a5d4d6ea1fc709605d5b2061d1bce27d6"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a5d4d6ea1fc709605d5b2061d1bce27d6">faiss::IndexLSH::train_thresholds</a></div><divclass="ttdeci">bool train_thresholds</div><divclass="ttdoc">whether we train thresholds or use 0 </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00031">IndexLSH.h:31</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a71c8aa08d3bd0483ccc0f11c22cd3cd8"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a71c8aa08d3bd0483ccc0f11c22cd3cd8">faiss::IndexLSH::rrot</a></div><divclass="ttdeci">RandomRotationMatrix rrot</div><divclass="ttdoc">optional random rotation </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00033">IndexLSH.h:33</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_1IndexLSH_html_aba7791311191bb168b79f8f59dd459ab"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#aba7791311191bb168b79f8f59dd459ab">faiss::IndexLSH::reset</a></div><divclass="ttdeci">virtual void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8cpp_source.html#l00182">IndexLSH.cpp:182</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a76de2c3212c72fd48136d84283a6e0a8"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a76de2c3212c72fd48136d84283a6e0a8">faiss::IndexLSH::add</a></div><divclass="ttdeci">virtual void add(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8cpp_source.html#l00124">IndexLSH.cpp:124</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a01f569a16a812aa3945b8a0b64eaff06"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a01f569a16a812aa3945b8a0b64eaff06">faiss::IndexLSH::train</a></div><divclass="ttdeci">virtual void train(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8cpp_source.html#l00094">IndexLSH.cpp:94</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_af8c48006f210f0cbbf45ec9972558d20"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#af8c48006f210f0cbbf45ec9972558d20">faiss::IndexLSH::nbits</a></div><divclass="ttdeci">int nbits</div><divclass="ttdoc">nb of bits per vector </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00028">IndexLSH.h:28</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_ae7bb111e0aa6bd1b2a13e5efa8ef9cea"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#ae7bb111e0aa6bd1b2a13e5efa8ef9cea">faiss::IndexLSH::apply_preprocess</a></div><divclass="ttdeci">const float * apply_preprocess(idx_t n, const float *x) const </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8cpp_source.html#l00059">IndexLSH.cpp:59</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexLSH_html_a71e9142e1256705f125ded9d647f4497"><divclass="ttname"><ahref="structfaiss_1_1IndexLSH.html#a71e9142e1256705f125ded9d647f4497">faiss::IndexLSH::rotate_data</a></div><divclass="ttdeci">bool rotate_data</div><divclass="ttdoc">whether to apply a random rotation to input </div><divclass="ttdef"><b>Definition:</b><ahref="IndexLSH_8h_source.html#l00030">IndexLSH.h:30</a></div></div>