<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="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment">/** Defines a few objects that apply transformations to a set of</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment"> * vectors Often these are pre-processing steps.</span></div>
<divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="comment">/** Any transformation applied on a set of vectors */</span></div>
<divclass="line"><aname="l00038"></a><spanclass="lineno"> 38</span> <spanclass="comment"> /// set if the VectorTransform does not require training, or if</span></div>
<divclass="line"><aname="l00039"></a><spanclass="lineno"> 39</span> <spanclass="comment"> /// training is done already</span></div>
<divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span> <spanclass="comment"> /** Perform training on a representative set of vectors. Does</span></div>
<divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span> <spanclass="comment"> * nothing by default.</span></div>
<divclass="line"><aname="l00051"></a><spanclass="lineno"> 51</span> <spanclass="comment"> /** apply the random roation, return new allocated matrix</span></div>
<divclass="line"><aname="l00052"></a><spanclass="lineno"> 52</span> <spanclass="comment"> * @param x size n * d_in</span></div>
<divclass="line"><aname="l00053"></a><spanclass="lineno"> 53</span> <spanclass="comment"> * @return size n * d_out</span></div>
<divclass="line"><aname="l00057"></a><spanclass="lineno"> 57</span> <spanclass="comment"> /// same as apply, but result is pre-allocated</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"> 58</span> <spanclass="comment"></span><spanclass="keyword">virtual</span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1VectorTransform.html#a90f1a218c224c049f1bd8b77a78d6aa0">apply_noalloc</a> (idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> * x,</div>
<divclass="line"><aname="l00061"></a><spanclass="lineno"> 61</span> <spanclass="comment"> /// reverse transformation. May not be implemented or may return</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"> 72</span> <spanclass="comment">/** Generic linear transformation, with bias term applied on output</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"> 73</span> <spanclass="comment"> * y = A * x + b</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"> 77</span> <spanclass="keywordtype">bool</span> have_bias; <spanclass="comment">///! whether to use the bias term</span></div>
<divclass="line"><aname="l00079"></a><spanclass="lineno"> 79</span> <spanclass="comment"> /// check if matrix A is orthonormal (enables reverse_transform)</span></div>
<divclass="line"><aname="l00088"></a><spanclass="lineno"> 88</span> <spanclass="comment"> /// both d_in > d_out and d_out < d_in are supported</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"> 92</span> <spanclass="comment"> /// same as apply, but result is pre-allocated</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"> 93</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1LinearTransform.html#af9c20b4ae67691b5713489884ca9f80f">apply_noalloc</a>(idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x, <spanclass="keywordtype">float</span>* xt) <spanclass="keyword">const override</span>;</div>
<divclass="line"><aname="l00096"></a><spanclass="lineno"> 96</span> <spanclass="comment"> /// is reverse transform if A has orthonormal lines</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1LinearTransform.html#a1642efca4f5eb524c29722b0441c4d13">transform_transpose</a> (idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span> * y,</div>
<divclass="line"><aname="l00104"></a><spanclass="lineno"> 104</span> <spanclass="comment"> /// compute A^T * A to set the is_orthonormal flag</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"> 117</span> <spanclass="comment"> /// both d_in > d_out and d_out < d_in are supported</span></div>
<divclass="line"><aname="l00121"></a><spanclass="lineno"> 121</span> <spanclass="comment"> /// must be called before the transform is used</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"> 131</span> <spanclass="comment">/** Applies a principal component analysis on a set of vectors,</span></div>
<divclass="line"><aname="l00132"></a><spanclass="lineno"> 132</span> <spanclass="comment"> * with optionally whitening and random rotation. */</span></div>
<divclass="line"><aname="l00135"></a><spanclass="lineno"> 135</span> <spanclass="comment"> /** after transformation the components are multiplied by</span></div>
<divclass="line"><aname="l00146"></a><spanclass="lineno"> 146</span> <spanclass="comment"> /// ratio between # training vectors and dimension</span></div>
<divclass="line"><aname="l00149"></a><spanclass="lineno"> 149</span> <spanclass="comment"> /// try to distribute output eigenvectors in this many bins</span></div>
<divclass="line"><aname="l00161"></a><spanclass="lineno"> 161</span> <spanclass="comment">// the final matrix is computed after random rotation and/or whitening</span></div>
<divclass="line"><aname="l00165"></a><spanclass="lineno"> 165</span> <spanclass="comment"> /// train on n vectors. If n < d_in then the eigenvector matrix</span></div>
<divclass="line"><aname="l00166"></a><spanclass="lineno"> 166</span> <spanclass="comment"> /// will be completed with 0s</span></div>
<divclass="line"><aname="l00167"></a><spanclass="lineno"> 167</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1PCAMatrix.html#a8f2dd12da8dce3cbeb22da9c5d4ec3e7">train</a>(<aclass="code"href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">Index::idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* x) <spanclass="keyword">override</span>;</div>
<divclass="line"><aname="l00172"></a><spanclass="lineno"> 172</span> <spanclass="comment"> /// called after mean, PCAMat and eigenvalues are computed</span></div>
<divclass="line"><aname="l00180"></a><spanclass="lineno"> 180</span> <spanclass="comment">/** Applies a rotation to align the dimensions with a PQ to minimize</span></div>
<divclass="line"><aname="l00181"></a><spanclass="lineno"> 181</span> <spanclass="comment"> * the reconstruction error. Can be used before an IndexPQ or an</span></div>
<divclass="line"><aname="l00182"></a><spanclass="lineno"> 182</span> <spanclass="comment"> * IndexIVFPQ. The method is the non-parametric version described in:</span></div>
<divclass="line"><aname="l00190"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1OPQMatrix.html#a07ad0c0c84f96a6880c1c8eaf09596e3"> 190</a></span> <spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1OPQMatrix.html#a07ad0c0c84f96a6880c1c8eaf09596e3">M</a>; <spanclass="comment">///< nb of subquantizers</span></div>
<divclass="line"><aname="l00191"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1OPQMatrix.html#a12cb3e05989dee37592b682070c31000"> 191</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1OPQMatrix.html#a12cb3e05989dee37592b682070c31000">niter</a>; <spanclass="comment">///< Number of outer training iterations</span></div>
<divclass="line"><aname="l00192"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1OPQMatrix.html#ab88c87a3931ec356904abf5f1f797a83"> 192</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1OPQMatrix.html#ab88c87a3931ec356904abf5f1f797a83">niter_pq</a>; <spanclass="comment">///< Number of training iterations for the PQ</span></div>
<divclass="line"><aname="l00193"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1OPQMatrix.html#a6406e97b05c831cc19b9343be3b43a1f"> 193</a></span> <spanclass="comment"></span><spanclass="keywordtype">int</span><aclass="code"href="structfaiss_1_1OPQMatrix.html#a6406e97b05c831cc19b9343be3b43a1f">niter_pq_0</a>; <spanclass="comment">///< same, for the first outer iteration</span></div>
<divclass="line"><aname="l00195"></a><spanclass="lineno"> 195</span> <spanclass="comment"> /// if there are too many training points, resample</span></div>
<divclass="line"><aname="l00199"></a><spanclass="lineno"> 199</span> <spanclass="comment"> /// if non-NULL, use this product quantizer for training</span></div>
<divclass="line"><aname="l00200"></a><spanclass="lineno"> 200</span> <spanclass="comment"> /// should be constructed with (d_out, M, _)</span></div>
<divclass="line"><aname="l00203"></a><spanclass="lineno"> 203</span> <spanclass="comment"> /// if d2 != -1, output vectors of this dimension</span></div>
<divclass="line"><aname="l00210"></a><spanclass="lineno"> 210</span> <spanclass="comment">/** remap dimensions for intput vectors, possibly inserting 0s</span></div>
<divclass="line"><aname="l00211"></a><spanclass="lineno"> 211</span> <spanclass="comment"> * strictly speaking this is also a linear transform but we don't want</span></div>
<divclass="line"><aname="l00212"></a><spanclass="lineno"> 212</span> <spanclass="comment"> * to compute it with matrix multiplies */</span></div>
<divclass="line"><aname="l00221"></a><spanclass="lineno"> 221</span> <spanclass="comment"> /// remap input to output, skipping or inserting dimensions as needed</span></div>
<divclass="line"><aname="l00222"></a><spanclass="lineno"> 222</span> <spanclass="comment"> /// if uniform: distribute dimensions uniformly</span></div>
<divclass="line"><aname="l00223"></a><spanclass="lineno"> 223</span> <spanclass="comment"> /// otherwise just take the d_out first ones.</span></div>
<divclass="line"><aname="l00228"></a><spanclass="lineno"> 228</span> <spanclass="comment"> /// reverse transform correct only when the mapping is a permuation</span></div>
<divclass="line"><aname="l00229"></a><spanclass="lineno"> 229</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1RemapDimensionsTransform.html#a2fc83e79e4d3c7853bfd6931cbbaf82a">reverse_transform</a>(idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* xt, <spanclass="keywordtype">float</span>* x) <spanclass="keyword">const override</span>;</div>
<divclass="line"><aname="l00244"></a><spanclass="lineno"> 244</span> <spanclass="comment"> /// Identity transform since norm is not revertible</span></div>
<divclass="line"><aname="l00245"></a><spanclass="lineno"> 245</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1NormalizationTransform.html#a58cc73dea14c1591a8812291d3d85bc0">reverse_transform</a>(idx_t n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* xt, <spanclass="keywordtype">float</span>* x) <spanclass="keyword">const override</span>;</div>
<divclass="line"><aname="l00248"></a><spanclass="lineno"> 248</span> <spanclass="comment">/** Subtract the mean of each component from the vectors. */</span></div>
<divclass="line"><aname="l00269"></a><spanclass="lineno"> 269</span> <spanclass="comment">/** Index that applies a LinearTransform transform on vectors before</span></div>
<divclass="line"><aname="l00270"></a><spanclass="lineno"> 270</span> <spanclass="comment"> * handing them over to a sub-index */</span></div>
<divclass="line"><aname="l00276"></a><spanclass="lineno"><aclass="line"href="structfaiss_1_1IndexPreTransform.html#ae5ec3f184eb211e7d6e204082b52c8c0"> 276</a></span> <spanclass="keywordtype">bool</span><aclass="code"href="structfaiss_1_1IndexPreTransform.html#ae5ec3f184eb211e7d6e204082b52c8c0">own_fields</a>; <spanclass="comment">///! whether pointers are deleted in destructor</span></div>
<divclass="line"><aname="l00282"></a><spanclass="lineno"> 282</span> <spanclass="comment"> /// ltrans is the last transform before the index</span></div>
<divclass="line"><aname="l00295"></a><spanclass="lineno"> 295</span> <spanclass="comment"> /** removes IDs from the index. Not supported by all indexes.</span></div>
<divclass="line"><aname="l00307"></a><spanclass="lineno"> 307</span> <spanclass="comment">/* range search, no attempt is done to change the radius */</span></div>
<divclass="line"><aname="l00308"></a><spanclass="lineno"> 308</span> <spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexPreTransform.html#a7d19f68aae0c30f1641ed9f2b2303bae">range_search</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> radius,</div>
<divclass="line"><aname="l00321"></a><spanclass="lineno"> 321</span> <spanclass="comment"> /// apply the transforms in the chain. The returned float * may be</span></div>
<divclass="line"><aname="l00322"></a><spanclass="lineno"> 322</span> <spanclass="comment"> /// equal to x, otherwise it should be deallocated.</span></div>
<divclass="line"><aname="l00323"></a><spanclass="lineno"> 323</span> <spanclass="comment"></span><spanclass="keyword">const</span><spanclass="keywordtype">float</span> * <aclass="code"href="structfaiss_1_1IndexPreTransform.html#aa773a5763ebdd1561152b34453fda96d">apply_chain</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>;</div>
<divclass="line"><aname="l00325"></a><spanclass="lineno"> 325</span> <spanclass="comment"> /// Reverse the transforms in the chain. May not be implemented for</span></div>
<divclass="line"><aname="l00326"></a><spanclass="lineno"> 326</span> <spanclass="comment"> /// all transforms in the chain or may return approximate results.</span></div>
<divclass="line"><aname="l00327"></a><spanclass="lineno"> 327</span> <spanclass="comment"></span><spanclass="keywordtype">void</span><aclass="code"href="structfaiss_1_1IndexPreTransform.html#aaa4851311641da569d02f8adbe1f04f0">reverse_chain</a> (<aclass="code"href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <spanclass="keyword">const</span><spanclass="keywordtype">float</span>* xt, <spanclass="keywordtype">float</span>* x) <spanclass="keyword">const</span>;</div>
<divclass="ttc"id="structfaiss_1_1LinearTransform_html_a1642efca4f5eb524c29722b0441c4d13"><divclass="ttname"><ahref="structfaiss_1_1LinearTransform.html#a1642efca4f5eb524c29722b0441c4d13">faiss::LinearTransform::transform_transpose</a></div><divclass="ttdeci">void transform_transpose(idx_t n, const float *y, float *x) const </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00135">VectorTransform.cpp:135</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_aee3cbbe7915ec9ed13d59ca9276bdefc"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#aee3cbbe7915ec9ed13d59ca9276bdefc">faiss::IndexPreTransform::index</a></div><divclass="ttdeci">Index * index</div><divclass="ttdoc">! chain of tranforms </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00274">VectorTransform.h:274</a></div></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#l00115">VectorTransform.h:115</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_a12cb3e05989dee37592b682070c31000"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#a12cb3e05989dee37592b682070c31000">faiss::OPQMatrix::niter</a></div><divclass="ttdeci">int niter</div><divclass="ttdoc">Number of outer training iterations. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00191">VectorTransform.h:191</a></div></div>
<divclass="ttc"id="structfaiss_1_1CenteringTransform_html_a626c70429e81057d953e173a38f98e3c"><divclass="ttname"><ahref="structfaiss_1_1CenteringTransform.html#a626c70429e81057d953e173a38f98e3c">faiss::CenteringTransform::train</a></div><divclass="ttdeci">void train(Index::idx_t n, const float *x) override</div><divclass="ttdoc">train on n vectors. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00812">VectorTransform.cpp:812</a></div></div>
<divclass="ttc"id="structfaiss_1_1RandomRotationMatrix_html_a64e406c8f73c7692bcf7d97b27305fc6"><divclass="ttname"><ahref="structfaiss_1_1RandomRotationMatrix.html#a64e406c8f73c7692bcf7d97b27305fc6">faiss::RandomRotationMatrix::RandomRotationMatrix</a></div><divclass="ttdeci">RandomRotationMatrix(int d_in, int d_out)</div><divclass="ttdoc">both d_in &gt; d_out and d_out &lt; d_in are supported </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00118">VectorTransform.h:118</a></div></div>
<divclass="ttc"id="structfaiss_1_1RandomRotationMatrix_html_a857ad8c32fb76b3298d4eea4338ff66f"><divclass="ttname"><ahref="structfaiss_1_1RandomRotationMatrix.html#a857ad8c32fb76b3298d4eea4338ff66f">faiss::RandomRotationMatrix::init</a></div><divclass="ttdeci">void init(int seed)</div><divclass="ttdoc">must be called before the transform is used </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00215">VectorTransform.cpp:215</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_a8e48ac9fde5e76e378553b2a6ec2c86e"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#a8e48ac9fde5e76e378553b2a6ec2c86e">faiss::IndexPreTransform::reset</a></div><divclass="ttdeci">void reset() override</div><divclass="ttdoc">removes all elements from the database. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l01035">VectorTransform.cpp:1035</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_ab88c87a3931ec356904abf5f1f797a83"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#ab88c87a3931ec356904abf5f1f797a83">faiss::OPQMatrix::niter_pq</a></div><divclass="ttdeci">int niter_pq</div><divclass="ttdoc">Number of training iterations for the PQ. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00192">VectorTransform.h:192</a></div></div>
<divclass="ttc"id="structfaiss_1_1VectorTransform_html_a137f48bab695736f0b1d79a50cddc858"><divclass="ttname"><ahref="structfaiss_1_1VectorTransform.html#a137f48bab695736f0b1d79a50cddc858">faiss::VectorTransform::VectorTransform</a></div><divclass="ttdeci">VectorTransform(int d_in=0, int d_out=0)</div><divclass="ttdoc">! output dimension </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00033">VectorTransform.h:33</a></div></div>
<divclass="ttc"id="structfaiss_1_1LinearTransform_html_aca77897ef5c27c69374b4d9555e5b332"><divclass="ttname"><ahref="structfaiss_1_1LinearTransform.html#aca77897ef5c27c69374b4d9555e5b332">faiss::LinearTransform::set_is_orthonormal</a></div><divclass="ttdeci">void set_is_orthonormal()</div><divclass="ttdoc">compute A^T * A to set the is_orthonormal flag </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00160">VectorTransform.cpp:160</a></div></div>
<divclass="ttc"id="structfaiss_1_1RemapDimensionsTransform_html_a09202a195ff5f75f83e68792751a637f"><divclass="ttname"><ahref="structfaiss_1_1RemapDimensionsTransform.html#a09202a195ff5f75f83e68792751a637f">faiss::RemapDimensionsTransform::map</a></div><divclass="ttdeci">std::vector< int > map</div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00217">VectorTransform.h:217</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_aa773a5763ebdd1561152b34453fda96d"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#aa773a5763ebdd1561152b34453fda96d">faiss::IndexPreTransform::apply_chain</a></div><divclass="ttdeci">const float * apply_chain(idx_t n, const float *x) const </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00964">VectorTransform.cpp:964</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_a416aaf28d7a533dcf7d2d7de434e993c"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#a416aaf28d7a533dcf7d2d7de434e993c">faiss::IndexPreTransform::train</a></div><divclass="ttdeci">void train(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00906">VectorTransform.cpp:906</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_1LinearTransform_html_a078caa663cf329de13851ebb026fb5d5"><divclass="ttname"><ahref="structfaiss_1_1LinearTransform.html#a078caa663cf329de13851ebb026fb5d5">faiss::LinearTransform::reverse_transform</a></div><divclass="ttdeci">void reverse_transform(idx_t n, const float *xt, float *x) const override</div><divclass="ttdoc">works only if is_orthonormal </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00199">VectorTransform.cpp:199</a></div></div>
<divclass="ttc"id="structfaiss_1_1NormalizationTransform_html_a58cc73dea14c1591a8812291d3d85bc0"><divclass="ttname"><ahref="structfaiss_1_1NormalizationTransform.html#a58cc73dea14c1591a8812291d3d85bc0">faiss::NormalizationTransform::reverse_transform</a></div><divclass="ttdeci">void reverse_transform(idx_t n, const float *xt, float *x) const override</div><divclass="ttdoc">Identity transform since norm is not revertible. </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00796">VectorTransform.cpp:796</a></div></div>
<divclass="ttc"id="structfaiss_1_1PCAMatrix_html_ac9a4c97b5861081dfd8ca5881bb1a677"><divclass="ttname"><ahref="structfaiss_1_1PCAMatrix.html#ac9a4c97b5861081dfd8ca5881bb1a677">faiss::PCAMatrix::balanced_bins</a></div><divclass="ttdeci">int balanced_bins</div><divclass="ttdoc">try to distribute output eigenvectors in this many bins </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00150">VectorTransform.h:150</a></div></div>
<divclass="ttc"id="structfaiss_1_1CenteringTransform_html_a6135ee99d20a6b7c033359563a082b99"><divclass="ttname"><ahref="structfaiss_1_1CenteringTransform.html#a6135ee99d20a6b7c033359563a082b99">faiss::CenteringTransform::reverse_transform</a></div><divclass="ttdeci">void reverse_transform(idx_t n, const float *xt, float *x) const override</div><divclass="ttdoc">add the mean </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00840">VectorTransform.cpp:840</a></div></div>
<divclass="ttc"id="structfaiss_1_1NormalizationTransform_html_a80c94dc7d17c9a7a9edc627150401571"><divclass="ttname"><ahref="structfaiss_1_1NormalizationTransform.html#a80c94dc7d17c9a7a9edc627150401571">faiss::NormalizationTransform::apply_noalloc</a></div><divclass="ttdeci">void apply_noalloc(idx_t n, const float *x, float *xt) const override</div><divclass="ttdoc">same as apply, but result is pre-allocated </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00786">VectorTransform.cpp:786</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_ae5ec3f184eb211e7d6e204082b52c8c0"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#ae5ec3f184eb211e7d6e204082b52c8c0">faiss::IndexPreTransform::own_fields</a></div><divclass="ttdeci">bool own_fields</div><divclass="ttdoc">! the sub-index </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00276">VectorTransform.h:276</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_a6406e97b05c831cc19b9343be3b43a1f"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#a6406e97b05c831cc19b9343be3b43a1f">faiss::OPQMatrix::niter_pq_0</a></div><divclass="ttdeci">int niter_pq_0</div><divclass="ttdoc">same, for the first outer iteration </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00193">VectorTransform.h:193</a></div></div>
<divclass="ttc"id="structfaiss_1_1RemapDimensionsTransform_html_a2fc83e79e4d3c7853bfd6931cbbaf82a"><divclass="ttname"><ahref="structfaiss_1_1RemapDimensionsTransform.html#a2fc83e79e4d3c7853bfd6931cbbaf82a">faiss::RemapDimensionsTransform::reverse_transform</a></div><divclass="ttdeci">void reverse_transform(idx_t n, const float *xt, float *x) const override</div><divclass="ttdoc">reverse transform correct only when the mapping is a permuation </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l01139">VectorTransform.cpp:1139</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_afdd5b2c74d19ccc5c7a6e0199333321a"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#afdd5b2c74d19ccc5c7a6e0199333321a">faiss::OPQMatrix::max_train_points</a></div><divclass="ttdeci">size_t max_train_points</div><divclass="ttdoc">if there are too many training points, resample </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00196">VectorTransform.h:196</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_a6eb9d18ff15b1c598d3aa3bc9ab84519"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#a6eb9d18ff15b1c598d3aa3bc9ab84519">faiss::OPQMatrix::OPQMatrix</a></div><divclass="ttdeci">OPQMatrix(int d=0, int M=1, int d2=-1)</div><divclass="ttdoc">if d2 != -1, output vectors of this dimension </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00583">VectorTransform.cpp:583</a></div></div>
<divclass="ttc"id="structfaiss_1_1PCAMatrix_html_a117a70b8fca6d125725fe49fddebf97b"><divclass="ttname"><ahref="structfaiss_1_1PCAMatrix.html#a117a70b8fca6d125725fe49fddebf97b">faiss::PCAMatrix::prepare_Ab</a></div><divclass="ttdeci">void prepare_Ab()</div><divclass="ttdoc">called after mean, PCAMat and eigenvalues are computed </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00477">VectorTransform.cpp:477</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_a03c77c582a3421952e2cba2057083059"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#a03c77c582a3421952e2cba2057083059">faiss::IndexPreTransform::add</a></div><divclass="ttdeci">void add(idx_t n, const float *x) override</div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00993">VectorTransform.cpp:993</a></div></div>
<divclass="ttc"id="structfaiss_1_1RemapDimensionsTransform_html_a550be3d40c221d2134bf06a13dd33c4d"><divclass="ttname"><ahref="structfaiss_1_1RemapDimensionsTransform.html#a550be3d40c221d2134bf06a13dd33c4d">faiss::RemapDimensionsTransform::apply_noalloc</a></div><divclass="ttdeci">void apply_noalloc(idx_t n, const float *x, float *xt) const override</div><divclass="ttdoc">same as apply, but result is pre-allocated </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l01127">VectorTransform.cpp:1127</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_aaa4851311641da569d02f8adbe1f04f0"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#aaa4851311641da569d02f8adbe1f04f0">faiss::IndexPreTransform::reverse_chain</a></div><divclass="ttdeci">void reverse_chain(idx_t n, const float *xt, float *x) const </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00979">VectorTransform.cpp:979</a></div></div>
<divclass="ttc"id="structfaiss_1_1LinearTransform_html_a8a67a0178eab513cf87545f5d12d9569"><divclass="ttname"><ahref="structfaiss_1_1LinearTransform.html#a8a67a0178eab513cf87545f5d12d9569">faiss::LinearTransform::is_orthonormal</a></div><divclass="ttdeci">bool is_orthonormal</div><divclass="ttdoc">! whether to use the bias term </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00080">VectorTransform.h:80</a></div></div>
<divclass="ttc"id="structfaiss_1_1IndexPreTransform_html_a07fef0553b2ef2907f394470f61898b2"><divclass="ttname"><ahref="structfaiss_1_1IndexPreTransform.html#a07fef0553b2ef2907f394470f61898b2">faiss::IndexPreTransform::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="VectorTransform_8cpp_source.html#l01002">VectorTransform.cpp:1002</a></div></div>
<divclass="ttc"id="structfaiss_1_1PCAMatrix_html_af111f055b7571703a3aa270d89e99321"><divclass="ttname"><ahref="structfaiss_1_1PCAMatrix.html#af111f055b7571703a3aa270d89e99321">faiss::PCAMatrix::random_rotation</a></div><divclass="ttdeci">bool random_rotation</div><divclass="ttdoc">random rotation after PCA </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00144">VectorTransform.h:144</a></div></div>
<divclass="ttc"id="structfaiss_1_1PCAMatrix_html_abdce90f57a3c4401f5230f03da901e0d"><divclass="ttname"><ahref="structfaiss_1_1PCAMatrix.html#abdce90f57a3c4401f5230f03da901e0d">faiss::PCAMatrix::max_points_per_d</a></div><divclass="ttdeci">size_t max_points_per_d</div><divclass="ttdoc">ratio between # training vectors and dimension </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00147">VectorTransform.h:147</a></div></div>
<divclass="ttc"id="structfaiss_1_1VectorTransform_html_af3b3a8bf95911f4b28128001c83f91a5"><divclass="ttname"><ahref="structfaiss_1_1VectorTransform.html#af3b3a8bf95911f4b28128001c83f91a5">faiss::VectorTransform::apply</a></div><divclass="ttdeci">float * apply(idx_t n, const float *x) const </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00070">VectorTransform.cpp:70</a></div></div>
<divclass="ttc"id="structfaiss_1_1VectorTransform_html_a90f1a218c224c049f1bd8b77a78d6aa0"><divclass="ttname"><ahref="structfaiss_1_1VectorTransform.html#a90f1a218c224c049f1bd8b77a78d6aa0">faiss::VectorTransform::apply_noalloc</a></div><divclass="ttdeci">virtual void apply_noalloc(idx_t n, const float *x, float *xt) const =0</div><divclass="ttdoc">same as apply, but result is pre-allocated </div></div>
<divclass="ttc"id="structfaiss_1_1CenteringTransform_html_aaab940f206cb54321c9729286db5f9d7"><divclass="ttname"><ahref="structfaiss_1_1CenteringTransform.html#aaab940f206cb54321c9729286db5f9d7">faiss::CenteringTransform::apply_noalloc</a></div><divclass="ttdeci">void apply_noalloc(idx_t n, const float *x, float *xt) const override</div><divclass="ttdoc">subtract the mean </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00829">VectorTransform.cpp:829</a></div></div>
<divclass="ttc"id="structfaiss_1_1OPQMatrix_html_a07ad0c0c84f96a6880c1c8eaf09596e3"><divclass="ttname"><ahref="structfaiss_1_1OPQMatrix.html#a07ad0c0c84f96a6880c1c8eaf09596e3">faiss::OPQMatrix::M</a></div><divclass="ttdeci">int M</div><divclass="ttdoc">nb of subquantizers </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8h_source.html#l00190">VectorTransform.h:190</a></div></div>
<divclass="ttc"id="structfaiss_1_1LinearTransform_html_af9c20b4ae67691b5713489884ca9f80f"><divclass="ttname"><ahref="structfaiss_1_1LinearTransform.html#af9c20b4ae67691b5713489884ca9f80f">faiss::LinearTransform::apply_noalloc</a></div><divclass="ttdeci">void apply_noalloc(idx_t n, const float *x, float *xt) const override</div><divclass="ttdoc">same as apply, but result is pre-allocated </div><divclass="ttdef"><b>Definition:</b><ahref="VectorTransform_8cpp_source.html#l00106">VectorTransform.cpp:106</a></div></div>