234 lines
35 KiB
HTML
234 lines
35 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.5"/>
|
|
<title>Faiss: /data/users/hoss/faiss/MetaIndexes.h Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">Faiss
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.5 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">/data/users/hoss/faiss/MetaIndexes.h</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/**</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Copyright (c) Facebook, Inc. and its affiliates.</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * This source code is licensed under the MIT license found in the</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * LICENSE file in the root directory of this source tree.</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment">// -*- c++ -*-</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#ifndef META_INDEXES_H</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor"></span><span class="preprocessor">#define META_INDEXES_H</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor"></span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include <vector></span></div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include <unordered_map></span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "Index.h"</span></div>
|
|
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "IndexShards.h"</span></div>
|
|
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="preprocessor">#include "IndexReplicas.h"</span></div>
|
|
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span> </div>
|
|
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="keyword">namespace </span>faiss {</div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment">/** Index that translates search results to ids */</span></div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="structfaiss_1_1IndexIDMap.html"> 22</a></span> <span class="keyword">struct </span><a class="code" href="structfaiss_1_1IndexIDMap.html">IndexIDMap</a> : <a class="code" href="structfaiss_1_1Index.html">Index</a> {</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <a class="code" href="structfaiss_1_1Index.html">Index</a> * index; <span class="comment">///! the sub-index</span></div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb"> 24</a></span> <span class="comment"></span> <span class="keywordtype">bool</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb">own_fields</a>; <span class="comment">///! whether pointers are deleted in destructo</span></div>
|
|
<div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="structfaiss_1_1IndexIDMap.html#ad1cc5658f1879f6a2b00d76cca58cf3b"> 25</a></span> <span class="comment"></span> std::vector<long> <a class="code" href="structfaiss_1_1IndexIDMap.html#ad1cc5658f1879f6a2b00d76cca58cf3b">id_map</a>;</div>
|
|
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div>
|
|
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keyword">explicit</span> <a class="code" href="structfaiss_1_1IndexIDMap.html">IndexIDMap</a> (<a class="code" href="structfaiss_1_1Index.html">Index</a> *index);</div>
|
|
<div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment"> /// Same as add_core, but stores xids instead of sequential ids</span></div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> /// @param xids if non-null, ids to store for the vectors (size n)</span></div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#aeace75e53648c052d05c357b744e090b">add_with_ids</a>(<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x, <span class="keyword">const</span> <span class="keywordtype">long</span>* xids) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="comment"> /// this will fail. Use add_with_ids</span></div>
|
|
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#a16cce6c1e83d0d5f069c9b0399896450">add</a>(<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#a2f36fa9150a465b48952afbba856e2a1">search</a>(</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n,</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keyword">const</span> <span class="keywordtype">float</span>* x,</div>
|
|
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k,</div>
|
|
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordtype">float</span>* distances,</div>
|
|
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>* labels) <span class="keyword">const override</span>;</div>
|
|
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div>
|
|
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#ac873cb03aa323a06dca5d6f3af5fe559">train</a>(<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div>
|
|
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#a70aca5b0f665c5a109d5dadf1e13b448">reset</a>() <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="comment"> /// remove ids adapted to IndexFlat</span></div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="comment"></span> <span class="keywordtype">long</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#a699ca4891bf3a437b2a182c04d33d9b9">remove_ids</a>(<span class="keyword">const</span> <a class="code" href="structfaiss_1_1IDSelector.html">IDSelector</a>& sel) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> </div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap.html#a7dbeaf9d44d6783d371f12405e8b7f40">range_search</a> (<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span> *x, <span class="keywordtype">float</span> radius,</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <a class="code" href="structfaiss_1_1RangeSearchResult.html">RangeSearchResult</a> *result) <span class="keyword">const override</span>;</div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  ~<a class="code" href="structfaiss_1_1IndexIDMap.html">IndexIDMap</a>() <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="structfaiss_1_1IndexIDMap.html">IndexIDMap</a> () {<a class="code" href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb">own_fields</a>=<span class="keyword">false</span>; index=<span class="keyword">nullptr</span>; }</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span> };</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span> <span class="comment">/** same as IndexIDMap but also provides an efficient reconstruction</span></div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span> <span class="comment"> implementation via a 2-way index */</span></div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="structfaiss_1_1IndexIDMap2.html"> 59</a></span> <span class="keyword">struct </span><a class="code" href="structfaiss_1_1IndexIDMap2.html">IndexIDMap2</a> : <a class="code" href="structfaiss_1_1IndexIDMap.html">IndexIDMap</a> {</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  std::unordered_map<idx_t, idx_t> rev_map;</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keyword">explicit</span> <a class="code" href="structfaiss_1_1IndexIDMap2.html">IndexIDMap2</a> (<a class="code" href="structfaiss_1_1Index.html">Index</a> *index);</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span> <span class="comment"> /// make the rev_map from scratch</span></div>
|
|
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span> <span class="comment"></span> <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap2.html#a646302669189e370d9d864fc18f096fe">construct_rev_map</a> ();</div>
|
|
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div>
|
|
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap2.html#a33ff76975891695c2fa45ed26fc8eae9">add_with_ids</a>(idx_t n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x, <span class="keyword">const</span> <span class="keywordtype">long</span>* xids) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div>
|
|
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keywordtype">long</span> <a class="code" href="structfaiss_1_1IndexIDMap2.html#a87e313ebc8dd62fb734a61a6d95a98f0">remove_ids</a>(<span class="keyword">const</span> <a class="code" href="structfaiss_1_1IDSelector.html">IDSelector</a>& sel) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div>
|
|
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexIDMap2.html#a3660adb35a3299bc328988f5ff2199fe">reconstruct</a> (idx_t key, <span class="keywordtype">float</span> * recons) <span class="keyword">const override</span>;</div>
|
|
<div class="line"><a name="l00073"></a><span class="lineno"> 73</span> </div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  ~<a class="code" href="structfaiss_1_1IndexIDMap2.html">IndexIDMap2</a>()<span class="keyword"> override </span>{}</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="structfaiss_1_1IndexIDMap2.html">IndexIDMap2</a> () {}</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> };</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="comment">/** splits input vectors in segments and assigns each segment to a sub-index</span></div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span> <span class="comment"> * used to distribute a MultiIndexQuantizer</span></div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span> <span class="comment"> */</span></div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="structfaiss_1_1IndexSplitVectors.html"> 82</a></span> <span class="keyword">struct </span><a class="code" href="structfaiss_1_1IndexSplitVectors.html">IndexSplitVectors</a>: <a class="code" href="structfaiss_1_1Index.html">Index</a> {</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordtype">bool</span> own_fields;</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="keywordtype">bool</span> threaded;</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  std::vector<Index*> sub_indexes;</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> sum_d; <span class="comment">/// sum of dimensions seen so far</span></div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="comment"></span></div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keyword">explicit</span> <a class="code" href="structfaiss_1_1IndexSplitVectors.html#a70ba3367a08722fe4466dc49c21a4d2b">IndexSplitVectors</a> (<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> <a class="code" href="structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d">d</a>, <span class="keywordtype">bool</span> threaded = <span class="keyword">false</span>);</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordtype">void</span> add_sub_index (<a class="code" href="structfaiss_1_1Index.html">Index</a> *);</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordtype">void</span> sync_with_sub_indexes ();</div>
|
|
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> </div>
|
|
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexSplitVectors.html#af2ef88dc72b4a94f1190ecc8cb25881b">add</a>(<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div>
|
|
<div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexSplitVectors.html#a4a010daf51e44d9717e94400cc23c159">search</a>(</div>
|
|
<div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n,</div>
|
|
<div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="keyword">const</span> <span class="keywordtype">float</span>* x,</div>
|
|
<div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> k,</div>
|
|
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordtype">float</span>* distances,</div>
|
|
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a>* labels) <span class="keyword">const override</span>;</div>
|
|
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div>
|
|
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexSplitVectors.html#aafa4c780e325855fe247052453967845">train</a>(<a class="code" href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">idx_t</a> n, <span class="keyword">const</span> <span class="keywordtype">float</span>* x) <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div>
|
|
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">void</span> <a class="code" href="structfaiss_1_1IndexSplitVectors.html#a8047981cb8d10c54107664c4955df402">reset</a>() <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div>
|
|
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  ~<a class="code" href="structfaiss_1_1IndexSplitVectors.html">IndexSplitVectors</a>() <span class="keyword">override</span>;</div>
|
|
<div class="line"><a name="l00107"></a><span class="lineno"> 107</span> };</div>
|
|
<div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div>
|
|
<div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div>
|
|
<div class="line"><a name="l00110"></a><span class="lineno"> 110</span> } <span class="comment">// namespace faiss</span></div>
|
|
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div>
|
|
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div>
|
|
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span> <span class="preprocessor">#endif</span></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap2_html"><div class="ttname"><a href="structfaiss_1_1IndexIDMap2.html">faiss::IndexIDMap2</a></div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00059">MetaIndexes.h:59</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_a2f36fa9150a465b48952afbba856e2a1"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#a2f36fa9150a465b48952afbba856e2a1">faiss::IndexIDMap::search</a></div><div class="ttdeci">void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00073">MetaIndexes.cpp:73</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IDSelector_html"><div class="ttname"><a href="structfaiss_1_1IDSelector.html">faiss::IDSelector</a></div><div class="ttdef"><b>Definition:</b> <a href="AuxIndexStructures_8h_source.html#l00054">AuxIndexStructures.h:54</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap2_html_a33ff76975891695c2fa45ed26fc8eae9"><div class="ttname"><a href="structfaiss_1_1IndexIDMap2.html#a33ff76975891695c2fa45ed26fc8eae9">faiss::IndexIDMap2::add_with_ids</a></div><div class="ttdeci">void add_with_ids(idx_t n, const float *x, const long *xids) override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00148">MetaIndexes.cpp:148</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html">faiss::IndexIDMap</a></div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00022">MetaIndexes.h:22</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html_a8047981cb8d10c54107664c4955df402"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html#a8047981cb8d10c54107664c4955df402">faiss::IndexSplitVectors::reset</a></div><div class="ttdeci">void reset() override</div><div class="ttdoc">removes all elements from the database. </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00303">MetaIndexes.cpp:303</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_a16cce6c1e83d0d5f069c9b0399896450"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#a16cce6c1e83d0d5f069c9b0399896450">faiss::IndexIDMap::add</a></div><div class="ttdeci">void add(idx_t n, const float *x) override</div><div class="ttdoc">this will fail. Use add_with_ids </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00043">MetaIndexes.cpp:43</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html">faiss::IndexSplitVectors</a></div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00082">MetaIndexes.h:82</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1Index_html_a2a002388d2c081c2dbab8508dcefe73d"><div class="ttname"><a href="structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d">faiss::Index::d</a></div><div class="ttdeci">int d</div><div class="ttdoc">vector dimension </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00066">Index.h:66</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1Index_html_ad3f0d3071f987baabbdd3da4500c87ea"><div class="ttname"><a href="structfaiss_1_1Index.html#ad3f0d3071f987baabbdd3da4500c87ea">faiss::Index::idx_t</a></div><div class="ttdeci">long idx_t</div><div class="ttdoc">all indices are this type </div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00062">Index.h:62</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_ad1cc5658f1879f6a2b00d76cca58cf3b"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#ad1cc5658f1879f6a2b00d76cca58cf3b">faiss::IndexIDMap::id_map</a></div><div class="ttdeci">std::vector< long > id_map</div><div class="ttdoc">! whether pointers are deleted in destructo </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00025">MetaIndexes.h:25</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_a7dbeaf9d44d6783d371f12405e8b7f40"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#a7dbeaf9d44d6783d371f12405e8b7f40">faiss::IndexIDMap::range_search</a></div><div class="ttdeci">void range_search(idx_t n, const float *x, float radius, RangeSearchResult *result) const override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00085">MetaIndexes.cpp:85</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html_aafa4c780e325855fe247052453967845"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html#aafa4c780e325855fe247052453967845">faiss::IndexSplitVectors::train</a></div><div class="ttdeci">void train(idx_t n, const float *x) override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00299">MetaIndexes.cpp:299</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap2_html_a646302669189e370d9d864fc18f096fe"><div class="ttname"><a href="structfaiss_1_1IndexIDMap2.html#a646302669189e370d9d864fc18f096fe">faiss::IndexIDMap2::construct_rev_map</a></div><div class="ttdeci">void construct_rev_map()</div><div class="ttdoc">make the rev_map from scratch </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00157">MetaIndexes.cpp:157</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html_af2ef88dc72b4a94f1190ecc8cb25881b"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html#af2ef88dc72b4a94f1190ecc8cb25881b">faiss::IndexSplitVectors::add</a></div><div class="ttdeci">void add(idx_t n, const float *x) override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00218">MetaIndexes.cpp:218</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap2_html_a87e313ebc8dd62fb734a61a6d95a98f0"><div class="ttname"><a href="structfaiss_1_1IndexIDMap2.html#a87e313ebc8dd62fb734a61a6d95a98f0">faiss::IndexIDMap2::remove_ids</a></div><div class="ttdeci">long remove_ids(const IDSelector &sel) override</div><div class="ttdoc">remove ids adapted to IndexFlat </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00166">MetaIndexes.cpp:166</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1RangeSearchResult_html"><div class="ttname"><a href="structfaiss_1_1RangeSearchResult.html">faiss::RangeSearchResult</a></div><div class="ttdef"><b>Definition:</b> <a href="AuxIndexStructures_8h_source.html#l00031">AuxIndexStructures.h:31</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_a70aca5b0f665c5a109d5dadf1e13b448"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#a70aca5b0f665c5a109d5dadf1e13b448">faiss::IndexIDMap::reset</a></div><div class="ttdeci">void reset() override</div><div class="ttdoc">removes all elements from the database. </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00056">MetaIndexes.cpp:56</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html_a4a010daf51e44d9717e94400cc23c159"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html#a4a010daf51e44d9717e94400cc23c159">faiss::IndexSplitVectors::search</a></div><div class="ttdeci">void search(idx_t n, const float *x, idx_t k, float *distances, idx_t *labels) const override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00224">MetaIndexes.cpp:224</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_a699ca4891bf3a437b2a182c04d33d9b9"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#a699ca4891bf3a437b2a182c04d33d9b9">faiss::IndexIDMap::remove_ids</a></div><div class="ttdeci">long remove_ids(const IDSelector &sel) override</div><div class="ttdoc">remove ids adapted to IndexFlat </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00112">MetaIndexes.cpp:112</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap2_html_a3660adb35a3299bc328988f5ff2199fe"><div class="ttname"><a href="structfaiss_1_1IndexIDMap2.html#a3660adb35a3299bc328988f5ff2199fe">faiss::IndexIDMap2::reconstruct</a></div><div class="ttdeci">void reconstruct(idx_t key, float *recons) const override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00174">MetaIndexes.cpp:174</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_ac873cb03aa323a06dca5d6f3af5fe559"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#ac873cb03aa323a06dca5d6f3af5fe559">faiss::IndexIDMap::train</a></div><div class="ttdeci">void train(idx_t n, const float *x) override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00050">MetaIndexes.cpp:50</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1Index_html"><div class="ttname"><a href="structfaiss_1_1Index.html">faiss::Index</a></div><div class="ttdef"><b>Definition:</b> <a href="Index_8h_source.html#l00061">Index.h:61</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_aeace75e53648c052d05c357b744e090b"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#aeace75e53648c052d05c357b744e090b">faiss::IndexIDMap::add_with_ids</a></div><div class="ttdeci">void add_with_ids(idx_t n, const float *x, const long *xids) override</div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00064">MetaIndexes.cpp:64</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexSplitVectors_html_a70ba3367a08722fe4466dc49c21a4d2b"><div class="ttname"><a href="structfaiss_1_1IndexSplitVectors.html#a70ba3367a08722fe4466dc49c21a4d2b">faiss::IndexSplitVectors::IndexSplitVectors</a></div><div class="ttdeci">IndexSplitVectors(idx_t d, bool threaded=false)</div><div class="ttdoc">sum of dimensions seen so far </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8cpp_source.html#l00188">MetaIndexes.cpp:188</a></div></div>
|
|
<div class="ttc" id="structfaiss_1_1IndexIDMap_html_affa8a764304410c96489c2b2e178bcdb"><div class="ttname"><a href="structfaiss_1_1IndexIDMap.html#affa8a764304410c96489c2b2e178bcdb">faiss::IndexIDMap::own_fields</a></div><div class="ttdeci">bool own_fields</div><div class="ttdoc">! the sub-index </div><div class="ttdef"><b>Definition:</b> <a href="MetaIndexes_8h_source.html#l00024">MetaIndexes.h:24</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.5
|
|
</small></address>
|
|
</body>
|
|
</html>
|