2017-02-23 06:26:44 +08:00
<!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: faiss::IndexIVFPQ Struct Reference< / 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 class = "current" > < a href = "annotated.html" > < span > Classes< / span > < / a > < / li >
< li > < 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 = "annotated.html" > < span > Class  List< / span > < / a > < / li >
< li > < a href = "classes.html" > < span > Class  Index< / span > < / a > < / li >
< li > < a href = "hierarchy.html" > < span > Class  Hierarchy< / span > < / a > < / li >
< li > < a href = "functions.html" > < span > Class  Members< / span > < / a > < / li >
< / ul >
< / div >
<!-- 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 id = "nav-path" class = "navpath" >
< ul >
< li class = "navelem" > < a class = "el" href = "namespacefaiss.html" > faiss< / a > < / li > < li class = "navelem" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html" > IndexIVFPQ< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "#pub-attribs" > Public Attributes< / a > |
< a href = "structfaiss_1_1IndexIVFPQ-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::IndexIVFPQ Struct Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "IndexIVFPQ_8h_source.html" > IndexIVFPQ.h< / a > > < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for faiss::IndexIVFPQ:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "structfaiss_1_1IndexIVFPQ.png" usemap = "#faiss::IndexIVFPQ_map" alt = "" / >
< map id = "faiss::IndexIVFPQ_map" name = "faiss::IndexIVFPQ_map" >
< area href = "structfaiss_1_1IndexIVF.html" alt = "faiss::IndexIVF" shape = "rect" coords = "85,56,246,80" / >
< area href = "structfaiss_1_1Index.html" alt = "faiss::Index" shape = "rect" coords = "85,0,246,24" / >
< area href = "structfaiss_1_1IndexIVFPQCompact.html" alt = "faiss::IndexIVFPQCompact" shape = "rect" coords = "0,168,161,192" / >
< area href = "structfaiss_1_1IndexIVFPQR.html" alt = "faiss::IndexIVFPQR" shape = "rect" coords = "171,168,332,192" / >
< / map >
< / div > < / div >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-methods" > < / a >
Public Member Functions< / h2 > < / td > < / tr >
< tr class = "memitem:a38e177f44798228fe81a0c35b86080fc" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a38e177f44798228fe81a0c35b86080fc" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < b > IndexIVFPQ< / b > (< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *< a class = "el" href = "structfaiss_1_1IndexIVF.html#a4b40cc7a70dff41196a3b8769586667a" > quantizer< / a > , size_t < a class = "el" href = "structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d" > d< / a > , size_t < a class = "el" href = "structfaiss_1_1IndexIVF.html#ab38fde4c923abefc4185eb7450b5b95b" > nlist< / a > , size_t M, size_t nbits_per_idx)< / td > < / tr >
< tr class = "separator:a38e177f44798228fe81a0c35b86080fc" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a74caa2dce623de244eacce3794ed2017" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a74caa2dce623de244eacce3794ed2017" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < b > set_typename< / b > () override< / td > < / tr >
< tr class = "separator:a74caa2dce623de244eacce3794ed2017" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a981c2748bfbd9b018494f119279a0342" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a981c2748bfbd9b018494f119279a0342" > add_with_ids< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, const long *xids=nullptr) override< / td > < / tr >
< tr class = "separator:a981c2748bfbd9b018494f119279a0342" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ac0cb8421b9885d691696d2ff4f76894b" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ac0cb8421b9885d691696d2ff4f76894b" > add_core_o< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, const long *xids, float *residuals_2, const long *precomputed_idx=nullptr)< / td > < / tr >
< tr class = "separator:ac0cb8421b9885d691696d2ff4f76894b" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:afa7c9a7ae0316d2a05acb60ab2b7a31a" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#afa7c9a7ae0316d2a05acb60ab2b7a31a" > search< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > k, float *distances, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > *labels) const override< / td > < / tr >
< tr class = "separator:afa7c9a7ae0316d2a05acb60ab2b7a31a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:acd807799dc56dcef0f221847a2af86f7" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "acd807799dc56dcef0f221847a2af86f7" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#acd807799dc56dcef0f221847a2af86f7" > reset< / a > () override< / td > < / tr >
< tr class = "memdesc:acd807799dc56dcef0f221847a2af86f7" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > removes all elements from the database. < br / > < / td > < / tr >
< tr class = "separator:acd807799dc56dcef0f221847a2af86f7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad9fa584ac2e12e9b9bb25a737efcc4d9" > < td class = "memItemLeft" align = "right" valign = "top" > virtual long  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ad9fa584ac2e12e9b9bb25a737efcc4d9" > remove_ids< / a > (const < a class = "el" href = "structfaiss_1_1IDSelector.html" > IDSelector< / a > & sel) override< / td > < / tr >
< tr class = "separator:ad9fa584ac2e12e9b9bb25a737efcc4d9" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af6565a5d8bab7be3df19c50d235bd662" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "af6565a5d8bab7be3df19c50d235bd662" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#af6565a5d8bab7be3df19c50d235bd662" > train_residual< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x) override< / td > < / tr >
< tr class = "memdesc:af6565a5d8bab7be3df19c50d235bd662" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > trains the product quantizer < br / > < / td > < / tr >
< tr class = "separator:af6565a5d8bab7be3df19c50d235bd662" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a4e06f04853dcb424dc393de5f641e917" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a4e06f04853dcb424dc393de5f641e917" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a4e06f04853dcb424dc393de5f641e917" > train_residual_o< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, float *residuals_2)< / td > < / tr >
< tr class = "memdesc:a4e06f04853dcb424dc393de5f641e917" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > same as train_residual, also output 2nd level residuals < br / > < / td > < / tr >
< tr class = "separator:a4e06f04853dcb424dc393de5f641e917" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1df10e9e5f4ff0dabf283f19ad94bbd4" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a1df10e9e5f4ff0dabf283f19ad94bbd4" > reconstruct_n< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > i0, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > ni, float *recons) const override< / td > < / tr >
< tr class = "separator:a1df10e9e5f4ff0dabf283f19ad94bbd4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a28ce697b1381eb7e7d7d25774a25e175" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a28ce697b1381eb7e7d7d25774a25e175" > reconstruct< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > key, float *recons) const override< / td > < / tr >
< tr class = "separator:a28ce697b1381eb7e7d7d25774a25e175" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aee355b57acde203a3caed46a93e16a3c" > < td class = "memItemLeft" align = "right" valign = "top" > size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#aee355b57acde203a3caed46a93e16a3c" > find_duplicates< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > *< a class = "el" href = "structfaiss_1_1IndexIVF.html#af16d325f5bef22b2e5f90ceea796e80d" > ids< / a > , size_t *lims) const < / td > < / tr >
< tr class = "separator:aee355b57acde203a3caed46a93e16a3c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa26497bd5b44c5dbbebfe6bfe453119e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aa26497bd5b44c5dbbebfe6bfe453119e" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < b > encode< / b > (long key, const float *x, uint8_t *code) const < / td > < / tr >
< tr class = "separator:aa26497bd5b44c5dbbebfe6bfe453119e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2017-04-06 19:33:41 +08:00
< tr class = "memitem:a1ae6cdd996bbd398fa4e87646c8f3ba6" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a1ae6cdd996bbd398fa4e87646c8f3ba6" > encode_multiple< / a > (size_t n, long *keys, const float *x, uint8_t *codes, bool compute_keys=false) const < / td > < / tr >
< tr class = "separator:a1ae6cdd996bbd398fa4e87646c8f3ba6" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ae1fb0cc3051dec8e322a78c443f8fc9a" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae1fb0cc3051dec8e322a78c443f8fc9a" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ae1fb0cc3051dec8e322a78c443f8fc9a" > decode_multiple< / a > (size_t n, const long *keys, const uint8_t *xcodes, float *x) const < / td > < / tr >
< tr class = "memdesc:ae1fb0cc3051dec8e322a78c443f8fc9a" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > inverse of encode_multiple < br / > < / td > < / tr >
< tr class = "separator:ae1fb0cc3051dec8e322a78c443f8fc9a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
2017-02-23 06:26:44 +08:00
< tr class = "memitem:ad5ae3ae94b4776291f6abee5110c7c0c" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ad5ae3ae94b4776291f6abee5110c7c0c" > search_knn_with_key< / a > (size_t nx, const float *qx, const long *keys, const float *coarse_dis, < a class = "el" href = "structfaiss_1_1HeapArray.html" > float_maxheap_array_t< / a > *res, bool store_pairs=false) const < / td > < / tr >
< tr class = "separator:ad5ae3ae94b4776291f6abee5110c7c0c" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad99c215aeaf92e995cb97f4044c4d267" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ad99c215aeaf92e995cb97f4044c4d267" > precompute_table< / a > ()< / td > < / tr >
< tr class = "memdesc:ad99c215aeaf92e995cb97f4044c4d267" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > build precomputed table < a href = "#ad99c215aeaf92e995cb97f4044c4d267" > More...< / a > < br / > < / td > < / tr >
< tr class = "separator:ad99c215aeaf92e995cb97f4044c4d267" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6b8964e2da609a9261a8a35ae347ecb2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a6b8964e2da609a9261a8a35ae347ecb2" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a6b8964e2da609a9261a8a35ae347ecb2" > merge_from_residuals< / a > (< a class = "el" href = "structfaiss_1_1IndexIVF.html" > IndexIVF< / a > & other) override< / td > < / tr >
< tr class = "memdesc:a6b8964e2da609a9261a8a35ae347ecb2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > used to implement merging < br / > < / td > < / tr >
< tr class = "separator:a6b8964e2da609a9261a8a35ae347ecb2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af278c710f6c7605f59e1da48a6dea37a" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#af278c710f6c7605f59e1da48a6dea37a" > copy_subset_to< / a > (< a class = "el" href = "structfaiss_1_1IndexIVFPQ.html" > IndexIVFPQ< / a > & other, int subset_type, long a1, long a2) const < / td > < / tr >
< tr class = "separator:af278c710f6c7605f59e1da48a6dea37a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "inherit_header pub_methods_structfaiss_1_1IndexIVF" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_methods_structfaiss_1_1IndexIVF')" > < img src = "closed.png" alt = "-" / >   Public Member Functions inherited from < a class = "el" href = "structfaiss_1_1IndexIVF.html" > faiss::IndexIVF< / a > < / td > < / tr >
< tr class = "memitem:a617f8c4ff40619d141c5c21dbf758ddf inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a617f8c4ff40619d141c5c21dbf758ddf" > IndexIVF< / a > (< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *< a class = "el" href = "structfaiss_1_1IndexIVF.html#a4b40cc7a70dff41196a3b8769586667a" > quantizer< / a > , size_t < a class = "el" href = "structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d" > d< / a > , size_t < a class = "el" href = "structfaiss_1_1IndexIVF.html#ab38fde4c923abefc4185eb7450b5b95b" > nlist< / a > , < a class = "el" href = "namespacefaiss.html#afd12191c638da74760ff397cf319752c" > MetricType< / a > metric=METRIC_INNER_PRODUCT)< / td > < / tr >
< tr class = "separator:a617f8c4ff40619d141c5c21dbf758ddf inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a7a1d5eec194db0977b2318c6ed6a2b86 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a7a1d5eec194db0977b2318c6ed6a2b86" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a7a1d5eec194db0977b2318c6ed6a2b86" > train< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x) override< / td > < / tr >
< tr class = "memdesc:a7a1d5eec194db0977b2318c6ed6a2b86 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Trains the quantizer and calls train_residual to train sub-quantizers. < br / > < / td > < / tr >
< tr class = "separator:a7a1d5eec194db0977b2318c6ed6a2b86 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a821002a9d3a1a74dc8d6f6072eca4075 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a821002a9d3a1a74dc8d6f6072eca4075" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a821002a9d3a1a74dc8d6f6072eca4075" > add< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x) override< / td > < / tr >
< tr class = "memdesc:a821002a9d3a1a74dc8d6f6072eca4075 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Quantizes x and calls add_with_key. < br / > < / td > < / tr >
< tr class = "separator:a821002a9d3a1a74dc8d6f6072eca4075 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0f22cc237c30c935df5b6560aecf8f01 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a0f22cc237c30c935df5b6560aecf8f01" > merge_from< / a > (< a class = "el" href = "structfaiss_1_1IndexIVF.html" > IndexIVF< / a > & other, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > add_id)< / td > < / tr >
< tr class = "separator:a0f22cc237c30c935df5b6560aecf8f01 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aae6f0fae1f0721af3aa0b5ea1bd9980d inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aae6f0fae1f0721af3aa0b5ea1bd9980d" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#aae6f0fae1f0721af3aa0b5ea1bd9980d" > make_direct_map< / a > ()< / td > < / tr >
< tr class = " memdesc:aae6f0fae1f0721af3aa0b5ea1bd9980d inherit pub_methods_structfaiss_1_1IndexIVF " > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > intialize a direct map < br / > < / td > < / tr >
< tr class = "separator:aae6f0fae1f0721af3aa0b5ea1bd9980d inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aeab84d4edf2cf9747c923e1a8395d9f3 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aeab84d4edf2cf9747c923e1a8395d9f3" > < / a >
double  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#aeab84d4edf2cf9747c923e1a8395d9f3" > imbalance_factor< / a > () const < / td > < / tr >
< tr class = "memdesc:aeab84d4edf2cf9747c923e1a8395d9f3 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > 1= perfectly balanced, > 1: imbalanced < br / > < / td > < / tr >
< tr class = "separator:aeab84d4edf2cf9747c923e1a8395d9f3 inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a513dfec3a250f08a9fdd18a24178e6bb inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a513dfec3a250f08a9fdd18a24178e6bb" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a513dfec3a250f08a9fdd18a24178e6bb" > print_stats< / a > () const < / td > < / tr >
< tr class = "memdesc:a513dfec3a250f08a9fdd18a24178e6bb inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > display some stats about the inverted lists < br / > < / td > < / tr >
< tr class = "separator:a513dfec3a250f08a9fdd18a24178e6bb inherit pub_methods_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "inherit_header pub_methods_structfaiss_1_1Index" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_methods_structfaiss_1_1Index')" > < img src = "closed.png" alt = "-" / >   Public Member Functions inherited from < a class = "el" href = "structfaiss_1_1Index.html" > faiss::Index< / a > < / td > < / tr >
< tr class = "memitem:a18475cb29370bd6ac3c9f41d39f2e8ec inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a18475cb29370bd6ac3c9f41d39f2e8ec" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < b > Index< / b > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > < a class = "el" href = "structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d" > d< / a > =0, < a class = "el" href = "namespacefaiss.html#afd12191c638da74760ff397cf319752c" > MetricType< / a > metric=METRIC_INNER_PRODUCT)< / td > < / tr >
< tr class = "separator:a18475cb29370bd6ac3c9f41d39f2e8ec inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a236897832a58dbb205e2d662c1929fb1 inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a236897832a58dbb205e2d662c1929fb1" > range_search< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, float radius, < a class = "el" href = "structfaiss_1_1RangeSearchResult.html" > RangeSearchResult< / a > *result) const < / td > < / tr >
< tr class = "separator:a236897832a58dbb205e2d662c1929fb1 inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c" > assign< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > *labels, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > k=1)< / td > < / tr >
< tr class = "separator:a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aaae77608bbda70b1098897e9167a82f9 inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#aaae77608bbda70b1098897e9167a82f9" > compute_residual< / a > (const float *x, float *residual, < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > key) const < / td > < / tr >
< tr class = "separator:aaae77608bbda70b1098897e9167a82f9 inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a373c30e3d87d1d4e616f450d87152b1a inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a373c30e3d87d1d4e616f450d87152b1a" > display< / a > () const < / td > < / tr >
< tr class = "separator:a373c30e3d87d1d4e616f450d87152b1a inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aae095c6209a16347262408b3346193a3 inherit pub_methods_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > virtual std::string  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#aae095c6209a16347262408b3346193a3" > get_typename< / a > () const < / td > < / tr >
< tr class = "separator:aae095c6209a16347262408b3346193a3 inherit pub_methods_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-attribs" > < / a >
Public Attributes< / h2 > < / td > < / tr >
< tr class = "memitem:afd13b471df293ae5a6e895704c69a4c3" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "afd13b471df293ae5a6e895704c69a4c3" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#afd13b471df293ae5a6e895704c69a4c3" > by_residual< / a > < / td > < / tr >
< tr class = "memdesc:afd13b471df293ae5a6e895704c69a4c3" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Encode residual or plain vector? < br / > < / td > < / tr >
< tr class = "separator:afd13b471df293ae5a6e895704c69a4c3" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1c66ff073c18a1edbe8444c24d870583" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a1c66ff073c18a1edbe8444c24d870583" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a1c66ff073c18a1edbe8444c24d870583" > use_precomputed_table< / a > < / td > < / tr >
< tr class = "memdesc:a1c66ff073c18a1edbe8444c24d870583" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > if by_residual, build precompute tables < br / > < / td > < / tr >
< tr class = "separator:a1c66ff073c18a1edbe8444c24d870583" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a31c6fb2faa4dadea4c0594338be7be90" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a31c6fb2faa4dadea4c0594338be7be90" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a31c6fb2faa4dadea4c0594338be7be90" > code_size< / a > < / td > < / tr >
< tr class = "memdesc:a31c6fb2faa4dadea4c0594338be7be90" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > code size per vector in bytes < br / > < / td > < / tr >
< tr class = "separator:a31c6fb2faa4dadea4c0594338be7be90" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a007303be116c8da65b6d058e3fc77d16" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a007303be116c8da65b6d058e3fc77d16" > < / a >
< a class = "el" href = "structfaiss_1_1ProductQuantizer.html" > ProductQuantizer< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a007303be116c8da65b6d058e3fc77d16" > pq< / a > < / td > < / tr >
< tr class = "memdesc:a007303be116c8da65b6d058e3fc77d16" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > produces the codes < br / > < / td > < / tr >
< tr class = "separator:a007303be116c8da65b6d058e3fc77d16" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9d5373633df7a9bec4de69400b9adeed" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a9d5373633df7a9bec4de69400b9adeed" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a9d5373633df7a9bec4de69400b9adeed" > do_polysemous_training< / a > < / td > < / tr >
< tr class = "memdesc:a9d5373633df7a9bec4de69400b9adeed" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > reorder PQ centroids after training? < br / > < / td > < / tr >
< tr class = "separator:a9d5373633df7a9bec4de69400b9adeed" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2b14cbb5acb3fc28a4df8fde3f5567cd" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a2b14cbb5acb3fc28a4df8fde3f5567cd" > < / a >
< a class = "el" href = "structfaiss_1_1PolysemousTraining.html" > PolysemousTraining< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a2b14cbb5acb3fc28a4df8fde3f5567cd" > polysemous_training< / a > < / td > < / tr >
< tr class = "memdesc:a2b14cbb5acb3fc28a4df8fde3f5567cd" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > if NULL, use default < br / > < / td > < / tr >
< tr class = "separator:a2b14cbb5acb3fc28a4df8fde3f5567cd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a7430fc4fa030c96497abced3b68358d4" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a7430fc4fa030c96497abced3b68358d4" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a7430fc4fa030c96497abced3b68358d4" > scan_table_threshold< / a > < / td > < / tr >
< tr class = "memdesc:a7430fc4fa030c96497abced3b68358d4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > use table computation or on-the-fly? < br / > < / td > < / tr >
< tr class = "separator:a7430fc4fa030c96497abced3b68358d4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a77501995b3671e377102d2db1a93ade4" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a77501995b3671e377102d2db1a93ade4" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a77501995b3671e377102d2db1a93ade4" > max_codes< / a > < / td > < / tr >
< tr class = "memdesc:a77501995b3671e377102d2db1a93ade4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > max nb of codes to visit to do a query < br / > < / td > < / tr >
< tr class = "separator:a77501995b3671e377102d2db1a93ade4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a3093a0a3e128eafce6e0583b75e9662e" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a3093a0a3e128eafce6e0583b75e9662e" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a3093a0a3e128eafce6e0583b75e9662e" > polysemous_ht< / a > < / td > < / tr >
< tr class = "memdesc:a3093a0a3e128eafce6e0583b75e9662e" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Hamming thresh for polysemous filtering. < br / > < / td > < / tr >
< tr class = "separator:a3093a0a3e128eafce6e0583b75e9662e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a0fa686cc6607c74bdaefede2e0d57805" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a0fa686cc6607c74bdaefede2e0d57805" > < / a >
std::vector< std::vector< br class = "typebreak" / >
< uint8_t > >   < / td > < td class = "memItemRight" valign = "bottom" > < b > codes< / b > < / td > < / tr >
< tr class = "separator:a0fa686cc6607c74bdaefede2e0d57805" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9b310195d610c3e326471b3758206b59" > < td class = "memItemLeft" align = "right" valign = "top" > std::vector< float >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a9b310195d610c3e326471b3758206b59" > precomputed_table< / a > < / td > < / tr >
< tr class = "separator:a9b310195d610c3e326471b3758206b59" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "inherit_header pub_attribs_structfaiss_1_1IndexIVF" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_attribs_structfaiss_1_1IndexIVF')" > < img src = "closed.png" alt = "-" / >   Public Attributes inherited from < a class = "el" href = "structfaiss_1_1IndexIVF.html" > faiss::IndexIVF< / a > < / td > < / tr >
< tr class = "memitem:ab38fde4c923abefc4185eb7450b5b95b inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ab38fde4c923abefc4185eb7450b5b95b" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#ab38fde4c923abefc4185eb7450b5b95b" > nlist< / a > < / td > < / tr >
< tr class = "memdesc:ab38fde4c923abefc4185eb7450b5b95b inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > number of possible key values < br / > < / td > < / tr >
< tr class = "separator:ab38fde4c923abefc4185eb7450b5b95b inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:affed235eadf27a13d753ee4d33a1dc58 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "affed235eadf27a13d753ee4d33a1dc58" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#affed235eadf27a13d753ee4d33a1dc58" > nprobe< / a > < / td > < / tr >
< tr class = "memdesc:affed235eadf27a13d753ee4d33a1dc58 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > number of probes at query time < br / > < / td > < / tr >
< tr class = "separator:affed235eadf27a13d753ee4d33a1dc58 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a4b40cc7a70dff41196a3b8769586667a inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a4b40cc7a70dff41196a3b8769586667a" > < / a >
< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a4b40cc7a70dff41196a3b8769586667a" > quantizer< / a > < / td > < / tr >
< tr class = "memdesc:a4b40cc7a70dff41196a3b8769586667a inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > quantizer that maps vectors to inverted lists < br / > < / td > < / tr >
< tr class = "separator:a4b40cc7a70dff41196a3b8769586667a inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a23ee7f75f8be4472a17778f2b33875de inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a23ee7f75f8be4472a17778f2b33875de" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a23ee7f75f8be4472a17778f2b33875de" > quantizer_trains_alone< / a > < / td > < / tr >
< tr class = "memdesc:a23ee7f75f8be4472a17778f2b33875de inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > just pass over the trainset to quantizer < br / > < / td > < / tr >
< tr class = "separator:a23ee7f75f8be4472a17778f2b33875de inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aed2e9757ad5f3c234fd8ad60175a2a73 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aed2e9757ad5f3c234fd8ad60175a2a73" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#aed2e9757ad5f3c234fd8ad60175a2a73" > own_fields< / a > < / td > < / tr >
< tr class = "memdesc:aed2e9757ad5f3c234fd8ad60175a2a73 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > whether object owns the quantizer < br / > < / td > < / tr >
< tr class = "separator:aed2e9757ad5f3c234fd8ad60175a2a73 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a9746bcd42ecec1501f221e918b25e8e7 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a9746bcd42ecec1501f221e918b25e8e7" > < / a >
< a class = "el" href = "structfaiss_1_1ClusteringParameters.html" > ClusteringParameters< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#a9746bcd42ecec1501f221e918b25e8e7" > cp< / a > < / td > < / tr >
< tr class = "memdesc:a9746bcd42ecec1501f221e918b25e8e7 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > to override default clustering params < br / > < / td > < / tr >
< tr class = "separator:a9746bcd42ecec1501f221e918b25e8e7 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af16d325f5bef22b2e5f90ceea796e80d inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "af16d325f5bef22b2e5f90ceea796e80d" > < / a >
std::vector< std::vector< long > >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#af16d325f5bef22b2e5f90ceea796e80d" > ids< / a > < / td > < / tr >
< tr class = "memdesc:af16d325f5bef22b2e5f90ceea796e80d inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Inverted lists for indexes. < br / > < / td > < / tr >
< tr class = "separator:af16d325f5bef22b2e5f90ceea796e80d inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aedd0c14b5654295b291638ec7f9f9517 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aedd0c14b5654295b291638ec7f9f9517" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1IndexIVF.html#aedd0c14b5654295b291638ec7f9f9517" > maintain_direct_map< / a > < / td > < / tr >
< tr class = "memdesc:aedd0c14b5654295b291638ec7f9f9517 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > map for direct access to the elements. Enables < a class = "el" href = "structfaiss_1_1Index.html#aaef6f4132b1f390121ebb11058baf190" > reconstruct()< / a > . < br / > < / td > < / tr >
< tr class = "separator:aedd0c14b5654295b291638ec7f9f9517 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a59fcfc4625260315c6423adc21d31ce9 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a59fcfc4625260315c6423adc21d31ce9" > < / a >
std::vector< long >   < / td > < td class = "memItemRight" valign = "bottom" > < b > direct_map< / b > < / td > < / tr >
< tr class = "separator:a59fcfc4625260315c6423adc21d31ce9 inherit pub_attribs_structfaiss_1_1IndexIVF" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "inherit_header pub_attribs_structfaiss_1_1Index" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_attribs_structfaiss_1_1Index')" > < img src = "closed.png" alt = "-" / >   Public Attributes inherited from < a class = "el" href = "structfaiss_1_1Index.html" > faiss::Index< / a > < / td > < / tr >
< tr class = "memitem:a294b7b4efde95636baed8a6691f49018 inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a294b7b4efde95636baed8a6691f49018" > < / a >
std::string  < / td > < td class = "memItemRight" valign = "bottom" > < b > index_typename< / b > < / td > < / tr >
< tr class = "separator:a294b7b4efde95636baed8a6691f49018 inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a2a002388d2c081c2dbab8508dcefe73d" > < / a >
int  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a2a002388d2c081c2dbab8508dcefe73d" > d< / a > < / td > < / tr >
< tr class = "memdesc:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > vector dimension < br / > < / td > < / tr >
< tr class = "separator:a2a002388d2c081c2dbab8508dcefe73d inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a6970683faa021b7a6f1a0865c0d4eccd" > < / a >
< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a6970683faa021b7a6f1a0865c0d4eccd" > ntotal< / a > < / td > < / tr >
< tr class = "memdesc:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > total nb of indexed vectors < br / > < / td > < / tr >
< tr class = "separator:a6970683faa021b7a6f1a0865c0d4eccd inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a5590d847c5c2b958affd2a05e58a6f23" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a5590d847c5c2b958affd2a05e58a6f23" > verbose< / a > < / td > < / tr >
< tr class = "memdesc:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > verbosity level < br / > < / td > < / tr >
< tr class = "separator:a5590d847c5c2b958affd2a05e58a6f23 inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a6e92732617c4dbe364e7678dd8773a7f" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a6e92732617c4dbe364e7678dd8773a7f" > is_trained< / a > < / td > < / tr >
< tr class = "memdesc:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > set if the < a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > does not require training, or if training is done already < br / > < / td > < / tr >
< tr class = "separator:a6e92732617c4dbe364e7678dd8773a7f inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a8e18f641854b2bde83ecff0a2f9a6f4e" > < / a >
< a class = "el" href = "namespacefaiss.html#afd12191c638da74760ff397cf319752c" > MetricType< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a8e18f641854b2bde83ecff0a2f9a6f4e" > metric_type< / a > < / td > < / tr >
< tr class = "memdesc:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > type of metric this index uses for search < br / > < / td > < / tr >
< tr class = "separator:a8e18f641854b2bde83ecff0a2f9a6f4e inherit pub_attribs_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "inherited" > < / a >
Additional Inherited Members< / h2 > < / td > < / tr >
< tr class = "inherit_header pub_types_structfaiss_1_1Index" > < td colspan = "2" onclick = "javascript:toggleInherit('pub_types_structfaiss_1_1Index')" > < img src = "closed.png" alt = "-" / >   Public Types inherited from < a class = "el" href = "structfaiss_1_1Index.html" > faiss::Index< / a > < / td > < / tr >
< tr class = "memitem:a040c6aed1f224f3ea7bf58eebc0c31a4 inherit pub_types_structfaiss_1_1Index" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a040c6aed1f224f3ea7bf58eebc0c31a4" > < / a >
typedef long  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > < / td > < / tr >
< tr class = "memdesc:a040c6aed1f224f3ea7bf58eebc0c31a4 inherit pub_types_structfaiss_1_1Index" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > all indices are this type < br / > < / td > < / tr >
< tr class = "separator:a040c6aed1f224f3ea7bf58eebc0c31a4 inherit pub_types_structfaiss_1_1Index" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Inverted file with Product Quantizer encoding. Each residual vector is encoded as a product quantizer code. < / p >
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8h_source.html#l00030" > 30< / a > of file < a class = "el" href = "IndexIVFPQ_8h_source.html" > IndexIVFPQ.h< / a > .< / p >
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "ac0cb8421b9885d691696d2ff4f76894b" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::add_core_o < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > n< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const long *  < / td >
< td class = "paramname" > < em > xids< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > float *  < / td >
< td class = "paramname" > < em > residuals_2< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const long *  < / td >
< td class = "paramname" > < em > precomputed_idx< / em > = < code > nullptr< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > same as add_core, also:< / p >
< ul >
< li > output 2nd level residuals if residuals_2 != NULL< / li >
< li > use precomputed list numbers if precomputed_idx != NULL < / li >
< / ul >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00200" > 200< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "a981c2748bfbd9b018494f119279a0342" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::add_with_ids < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > n< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const long *  < / td >
< td class = "paramname" > < em > xids< / em > = < code > nullptr< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Same as add, but stores xids instead of sequential ids.< / p >
< p > The default implementation fails with an assertion, as it is not supported by all indexes.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > xids< / td > < td > if non-null, ids to store for the vectors (size n) < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented from < a class = "el" href = "structfaiss_1_1Index.html#aa6931dfe054b33b02c842ff75f7a0c7f" > faiss::Index< / a > .< / p >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a4b6154a5194d574d037ba78c137a2fa5" > faiss::IndexIVFPQR< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00194" > 194< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "af278c710f6c7605f59e1da48a6dea37a" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::copy_subset_to < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html" > IndexIVFPQ< / a > &   < / td >
< td class = "paramname" > < em > other< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > int  < / td >
< td class = "paramname" > < em > subset_type< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long  < / td >
< td class = "paramname" > < em > a1< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long  < / td >
< td class = "paramname" > < em > a2< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > copy a subset of the entries index to the other index< / p >
< p > if subset_type == 0: copies ids in [a1, a2) if subset_type == 1: copies ids if id % a1 == a2 < / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00341" > 341< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "a1ae6cdd996bbd398fa4e87646c8f3ba6" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::encode_multiple < / td >
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > n< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long *  < / td >
< td class = "paramname" > < em > keys< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > uint8_t *  < / td >
< td class = "paramname" > < em > codes< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > compute_keys< / em > = < code > false< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Encode multiple vectors< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > n< / td > < td > nb vectors to encode < / td > < / tr >
< tr > < td class = "paramname" > keys< / td > < td > posting list ids for those vectors (size n) < / td > < / tr >
< tr > < td class = "paramname" > x< / td > < td > vectors (size n * d) < / td > < / tr >
< tr > < td class = "paramname" > codes< / td > < td > output codes (size n * code_size) < / td > < / tr >
< tr > < td class = "paramname" > compute_keys< / td > < td > if false, assume keys are precomputed, otherwise compute them < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00158" > 158< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "aee355b57acde203a3caed46a93e16a3c" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > size_t faiss::IndexIVFPQ::find_duplicates < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > *  < / td >
< td class = "paramname" > < em > ids< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t *  < / td >
< td class = "paramname" > < em > lims< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Find exact duplicates in the dataset.< / p >
< p > the duplicates are returned in pre-allocated arrays (see the max sizes).< / p >
< p > lims limits between groups of duplicates (max size ntotal / 2 + 1) ids ids[lims[i]] : ids[lims[i+1]-1] is a group of duplicates (max size ntotal) < / p >
< dl class = "section return" > < dt > Returns< / dt > < dd > n number of groups found < / dd > < / dl >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l01154" > 1154< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "ad99c215aeaf92e995cb97f4044c4d267" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::precompute_table < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > build precomputed table < / p >
< p > Precomputed tables for residuals< / p >
< p > During IVFPQ search with by_residual, we compute < / p >
< pre class = "fragment" > d = || x - y_C - y_R ||^2
< / pre > < p > where x is the query vector, y_C the coarse centroid, y_R the refined PQ centroid. The expression can be decomposed as:< / p >
< p > d = || x - y_C ||^2 + || y_R ||^2 + 2 * (y_C|y_R) - 2 * (x|y_R) < / p >
< hr / >
< p > term 1 term 2 term 3< / p >
< p > When using multiprobe, we use the following decomposition:< / p >
< ul >
< li > term 1 is the distance to the coarse centroid, that is computed during the 1st stage search.< / li >
< li > term 2 can be precomputed, as it does not involve x. However, because of the PQ, it needs nlist * M * ksub storage. This is why use_precomputed_table is off by default< / li >
< li > term 3 is the classical non-residual distance table.< / li >
< / ul >
< p > Since y_R defined by a product quantizer, it is split across subvectors and stored separately for each subvector. If the coarse quantizer is a < a class = "el" href = "structfaiss_1_1MultiIndexQuantizer.html" > MultiIndexQuantizer< / a > then the table can be stored more compactly.< / p >
< p > At search time, the tables for term 2 and term 3 are added up. This is faster when the length of the lists is > ksub * M. < / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00400" > 400< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "a28ce697b1381eb7e7d7d25774a25e175" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::reconstruct < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > key< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > float *  < / td >
< td class = "paramname" > < em > recons< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Reconstruct a stored vector (or an approximation if lossy coding)< / p >
< p > this function may not be defined for some indexes < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > key< / td > < td > id of the vector to reconstruct < / td > < / tr >
< tr > < td class = "paramname" > recons< / td > < td > reconstucted vector (size d) < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented from < a class = "el" href = "structfaiss_1_1Index.html#aaef6f4132b1f390121ebb11058baf190" > faiss::Index< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00311" > 311< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "a1df10e9e5f4ff0dabf283f19ad94bbd4" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::reconstruct_n < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > i0< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > ni< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > float *  < / td >
< td class = "paramname" > < em > recons< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Reconstruct a subset of the indexed vectors< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > i0< / td > < td > first vector to reconstruct < / td > < / tr >
< tr > < td class = "paramname" > ni< / td > < td > nb of vectors to reconstruct < / td > < / tr >
< tr > < td class = "paramname" > recons< / td > < td > output array of reconstructed vectors, size ni * d < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented from < a class = "el" href = "structfaiss_1_1Index.html#a1936604fffe16b0ef2a3879305950738" > faiss::Index< / a > .< / p >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a0f0d8fc6b2c6aa2431c1730111a3b22a" > faiss::IndexIVFPQR< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00282" > 282< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "ad9fa584ac2e12e9b9bb25a737efcc4d9" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > long faiss::IndexIVFPQ::remove_ids < / td >
< td > (< / td >
< td class = "paramtype" > const < a class = "el" href = "structfaiss_1_1IDSelector.html" > IDSelector< / a > &   < / td >
< td class = "paramname" > < em > sel< / em > < / td > < td > )< / td >
< td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > removes IDs from the index. Not supported by all indexes < / p >
< p > Reimplemented from < a class = "el" href = "structfaiss_1_1Index.html#af8bf7bd97aeed8ad5fc48b242379a68a" > faiss::Index< / a > .< / p >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#acc5eeeeb8ac8d2581ef07947932d9f6c" > faiss::IndexIVFPQR< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l01097" > 1097< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "afa7c9a7ae0316d2a05acb60ab2b7a31a" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::search < / td >
< td > (< / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > n< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > x< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a >   < / td >
< td class = "paramname" > < em > k< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > float *  < / td >
< td class = "paramname" > < em > distances< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > *  < / td >
< td class = "paramname" > < em > labels< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > override< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > query n vectors of dimension d to the index.< / p >
< p > return at most k vectors. If there are not enough results for a query, the result array is padded with -1s.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > x< / td > < td > input vectors to search, size n * d < / td > < / tr >
< tr > < td class = "paramname" > labels< / td > < td > output labels of the NNs, size n*k < / td > < / tr >
< tr > < td class = "paramname" > distances< / td > < td > output pairwise distances, size n*k < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Implements < a class = "el" href = "structfaiss_1_1Index.html#aced51b1ebc33c47ab3ae15ea906559a7" > faiss::Index< / a > .< / p >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a3e982ee6f1a3a025148270701867d04f" > faiss::IndexIVFPQR< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l01069" > 1069< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "ad5ae3ae94b4776291f6abee5110c7c0c" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::IndexIVFPQ::search_knn_with_key < / td >
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > nx< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > qx< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const long *  < / td >
< td class = "paramname" > < em > keys< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const float *  < / td >
< td class = "paramname" > < em > coarse_dis< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1HeapArray.html" > float_maxheap_array_t< / a > *  < / td >
< td class = "paramname" > < em > res< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > bool  < / td >
< td class = "paramname" > < em > store_pairs< / em > = < code > false< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > search a set of vectors, that are pre-quantized by the IVF quantizer. Fill in the corresponding heaps with the query results.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > nx< / td > < td > nb of vectors to query < / td > < / tr >
< tr > < td class = "paramname" > qx< / td > < td > query vectors, size nx * d < / td > < / tr >
< tr > < td class = "paramname" > keys< / td > < td > coarse quantization indices, size nx * nprobe < / td > < / tr >
< tr > < td class = "paramname" > coarse_dis< / td > < td > distances to coarse centroids, size nx * nprobe < / td > < / tr >
< tr > < td class = "paramname" > res< / td > < td > heaps for all the results, gives the nprobe < / td > < / tr >
< tr > < td class = "paramname" > store_pairs< / td > < td > store inv list index + inv list offset instead in upper/lower 32 bit of result, instead of ids (used for reranking). < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQCompact.html#a583dd638a00cb9246ac7b54ee6d65f95" > faiss::IndexIVFPQCompact< / a > .< / p >
2017-04-06 19:33:41 +08:00
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8cpp_source.html#l00970" > 970< / a > of file < a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< h2 class = "groupheader" > Member Data Documentation< / h2 >
< a class = "anchor" id = "a9b310195d610c3e326471b3758206b59" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > std::vector< float> faiss::IndexIVFPQ::precomputed_table< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > if use_precompute_table size nlist * pq.M * pq.ksub < / p >
< p > Definition at line < a class = "el" href = "IndexIVFPQ_8h_source.html#l00048" > 48< / a > of file < a class = "el" href = "IndexIVFPQ_8h_source.html" > IndexIVFPQ.h< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this struct was generated from the following files:< ul >
2017-03-21 01:33:21 +08:00
< li > /data/users/matthijs/github_faiss/faiss/< a class = "el" href = "IndexIVFPQ_8h_source.html" > IndexIVFPQ.h< / a > < / li >
< li > /data/users/matthijs/github_faiss/faiss/< a class = "el" href = "IndexIVFPQ_8cpp_source.html" > IndexIVFPQ.cpp< / a > < / li >
2017-02-23 06:26:44 +08:00
< / ul >
< / 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 >