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::Index 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_1Index.html" > Index< / a > < / li > < / ul >
< / div >
< / div > <!-- top -->
< div class = "header" >
< div class = "summary" >
< a href = "#pub-types" > Public Types< / a > |
< a href = "#pub-methods" > Public Member Functions< / a > |
< a href = "#pub-attribs" > Public Attributes< / a > |
< a href = "structfaiss_1_1Index-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::Index Struct Reference< span class = "mlabels" > < span class = "mlabel" > abstract< / span > < / span > < / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "Index_8h_source.html" > Index.h< / a > > < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for faiss::Index:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "structfaiss_1_1Index.png" usemap = "#faiss::Index_map" alt = "" / >
< map id = "faiss::Index_map" name = "faiss::Index_map" >
< area href = "classfaiss_1_1gpu_1_1GpuIndex.html" alt = "faiss::gpu::GpuIndex" shape = "rect" coords = "166,56,322,80" / >
< area href = "classfaiss_1_1gpu_1_1IndexProxy.html" alt = "faiss::gpu::IndexProxy" shape = "rect" coords = "166,112,322,136" / >
< area href = "structfaiss_1_1IndexFlat.html" alt = "faiss::IndexFlat" shape = "rect" coords = "166,168,322,192" / >
< area href = "structfaiss_1_1IndexIDMap.html" alt = "faiss::IndexIDMap" shape = "rect" coords = "166,224,322,248" / >
< area href = "structfaiss_1_1IndexIVF.html" alt = "faiss::IndexIVF" shape = "rect" coords = "166,280,322,304" / >
< area href = "structfaiss_1_1IndexLSH.html" alt = "faiss::IndexLSH" shape = "rect" coords = "166,336,322,360" / >
< area href = "structfaiss_1_1IndexPQ.html" alt = "faiss::IndexPQ" shape = "rect" coords = "166,392,322,416" / >
< area href = "structfaiss_1_1IndexPreTransform.html" alt = "faiss::IndexPreTransform" shape = "rect" coords = "166,448,322,472" / >
< area href = "structfaiss_1_1IndexRefineFlat.html" alt = "faiss::IndexRefineFlat" shape = "rect" coords = "166,504,322,528" / >
< area href = "structfaiss_1_1IndexShards.html" alt = "faiss::IndexShards" shape = "rect" coords = "166,560,322,584" / >
< area href = "structfaiss_1_1IndexSplitVectors.html" alt = "faiss::IndexSplitVectors" shape = "rect" coords = "166,616,322,640" / >
< area href = "structfaiss_1_1MultiIndexQuantizer.html" alt = "faiss::MultiIndexQuantizer" shape = "rect" coords = "166,672,322,696" / >
< / map >
< / div > < / div >
< table class = "memberdecls" >
< tr class = "heading" > < td colspan = "2" > < h2 class = "groupheader" > < a name = "pub-types" > < / a >
Public Types< / h2 > < / td > < / tr >
< tr class = "memitem:a040c6aed1f224f3ea7bf58eebc0c31a4" > < 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" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > all indices are this type < br / > < / td > < / tr >
< tr class = "separator:a040c6aed1f224f3ea7bf58eebc0c31a4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table > < 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:a18475cb29370bd6ac3c9f41d39f2e8ec" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8f67dfd73993e192dc78f2c93d9d9532" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a8f67dfd73993e192dc78f2c93d9d9532" > train< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x)< / td > < / tr >
< tr class = "separator:a8f67dfd73993e192dc78f2c93d9d9532" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1b5e9ac70adbce0897dd6c8276ad96f2" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a1b5e9ac70adbce0897dd6c8276ad96f2" > add< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x)=0< / td > < / tr >
< tr class = "separator:a1b5e9ac70adbce0897dd6c8276ad96f2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aa6931dfe054b33b02c842ff75f7a0c7f" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#aa6931dfe054b33b02c842ff75f7a0c7f" > add_with_ids< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > n, const float *x, const long *xids)< / td > < / tr >
< tr class = "separator:aa6931dfe054b33b02c842ff75f7a0c7f" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aced51b1ebc33c47ab3ae15ea906559a7" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#aced51b1ebc33c47ab3ae15ea906559a7" > 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 =0< / td > < / tr >
< tr class = "separator:aced51b1ebc33c47ab3ae15ea906559a7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a236897832a58dbb205e2d662c1929fb1" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a849361f5f0ab0aba8d419c86f2594191" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a849361f5f0ab0aba8d419c86f2594191" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a849361f5f0ab0aba8d419c86f2594191" > reset< / a > ()=0< / td > < / tr >
< tr class = "memdesc:a849361f5f0ab0aba8d419c86f2594191" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > removes all elements from the database. < br / > < / td > < / tr >
< tr class = "separator:a849361f5f0ab0aba8d419c86f2594191" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af8bf7bd97aeed8ad5fc48b242379a68a" > < td class = "memItemLeft" align = "right" valign = "top" > virtual long  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#af8bf7bd97aeed8ad5fc48b242379a68a" > remove_ids< / a > (const < a class = "el" href = "structfaiss_1_1IDSelector.html" > IDSelector< / a > & sel)< / td > < / tr >
< tr class = "separator:af8bf7bd97aeed8ad5fc48b242379a68a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aaef6f4132b1f390121ebb11058baf190" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#aaef6f4132b1f390121ebb11058baf190" > reconstruct< / a > (< a class = "el" href = "structfaiss_1_1Index.html#a040c6aed1f224f3ea7bf58eebc0c31a4" > idx_t< / a > key, float *recons) const < / td > < / tr >
< tr class = "separator:aaef6f4132b1f390121ebb11058baf190" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1936604fffe16b0ef2a3879305950738" > < td class = "memItemLeft" align = "right" valign = "top" > virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Index.html#a1936604fffe16b0ef2a3879305950738" > 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 < / td > < / tr >
< tr class = "separator:a1936604fffe16b0ef2a3879305950738" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aaae77608bbda70b1098897e9167a82f9" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a373c30e3d87d1d4e616f450d87152b1a" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:aae095c6209a16347262408b3346193a3" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2d9fcc5be66369215df74bb7d028424c" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a2d9fcc5be66369215df74bb7d028424c" > < / a >
virtual void  < / td > < td class = "memItemRight" valign = "bottom" > < b > set_typename< / b > ()=0< / td > < / tr >
< tr class = "separator:a2d9fcc5be66369215df74bb7d028424c" > < 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:a294b7b4efde95636baed8a6691f49018" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a2a002388d2c081c2dbab8508dcefe73d" > < 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" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > vector dimension < br / > < / td > < / tr >
< tr class = "separator:a2a002388d2c081c2dbab8508dcefe73d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6970683faa021b7a6f1a0865c0d4eccd" > < 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" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > total nb of indexed vectors < br / > < / td > < / tr >
< tr class = "separator:a6970683faa021b7a6f1a0865c0d4eccd" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a5590d847c5c2b958affd2a05e58a6f23" > < 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" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > verbosity level < br / > < / td > < / tr >
< tr class = "separator:a5590d847c5c2b958affd2a05e58a6f23" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a6e92732617c4dbe364e7678dd8773a7f" > < 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" > < 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" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a8e18f641854b2bde83ecff0a2f9a6f4e" > < 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" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > type of metric this index uses for search < br / > < / td > < / tr >
< tr class = "separator:a8e18f641854b2bde83ecff0a2f9a6f4e" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Abstract structure for an index< / p >
< p > Supports adding vertices and searching them.< / p >
< p > Currently only asymmetric queries are supported: database-to-database queries are not implemented. < / p >
< p > Definition at line < a class = "el" href = "Index_8h_source.html#l00061" > 61< / a > of file < a class = "el" href = "Index_8h_source.html" > Index.h< / a > .< / p >
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "a1b5e9ac70adbce0897dd6c8276ad96f2" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual void faiss::Index::add < / 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 > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > pure virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Add n vectors of dimension d to the index.< / p >
< p > Vectors are implicitly assigned labels ntotal .. ntotal + n - 1 This function slices the input vectors in chuncks smaller than blocksize_add and calls add_core. < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > x< / td > < td > input matrix, size n * d < / td > < / tr >
< / table >
< / dd >
< / dl >
2017-03-21 01:33:21 +08:00
< p > Implemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQCompact.html#ade7b46bbbcaf244ad680104380afb1b8" > faiss::IndexIVFPQCompact< / a > , < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#a03c77c582a3421952e2cba2057083059" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1IndexFlat1D.html#a5dc39280262484ecadda5e11162c2457" > faiss::IndexFlat1D< / a > , < a class = "el" href = "structfaiss_1_1MultiIndexQuantizer.html#ad2d45625186b2daf6044f9266e6c1b93" > faiss::MultiIndexQuantizer< / a > , < a class = "el" href = "structfaiss_1_1IndexRefineFlat.html#a10d5009c838e8653fd767ca48a3e6fcc" > faiss::IndexRefineFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexSplitVectors.html#af2ef88dc72b4a94f1190ecc8cb25881b" > faiss::IndexSplitVectors< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexFlat.html#aca24d09a00743aa3087c1a14a66995b9" > faiss::gpu::GpuIndexFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexShards.html#a2e06889521c566525011eb46cc97cda6" > faiss::IndexShards< / a > , < a class = "el" href = "structfaiss_1_1IndexIVF.html#a821002a9d3a1a74dc8d6f6072eca4075" > faiss::IndexIVF< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVF.html#ace41857c97a357284acbe4556c9da3da" > faiss::gpu::GpuIndexIVF< / a > , < a class = "el" href = "structfaiss_1_1IndexLSH.html#a76de2c3212c72fd48136d84283a6e0a8" > faiss::IndexLSH< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1IndexProxy.html#a61319b7ea215bf0ec6709443d8d4ee20" > faiss::gpu::IndexProxy< / a > , < a class = "el" href = "structfaiss_1_1IndexPQ.html#ac72c9b93f8fe7e5ec27fbe26bb38a7bf" > faiss::IndexPQ< / a > , < a class = "el" href = "structfaiss_1_1IndexIDMap.html#a16cce6c1e83d0d5f069c9b0399896450" > faiss::IndexIDMap< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndex.html#aa6420b47642b0bb09e07eece0a97adad" > faiss::gpu::GpuIndex< / a > , and < a class = "el" href = "structfaiss_1_1IndexFlat.html#a406f028c702edec72477eacc5733f59c" > faiss::IndexFlat< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "aa6931dfe054b33b02c842ff75f7a0c7f" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::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 >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / 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 > 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 in < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#a07fef0553b2ef2907f394470f61898b2" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a4b6154a5194d574d037ba78c137a2fa5" > faiss::IndexIVFPQR< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFFlat.html#a5f7356766632d3ce2838f285aa6b8e76" > faiss::IndexIVFFlat< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFPQ.html#a3669471243f2bbd23a37cbafa6e78637" > faiss::gpu::GpuIndexIVFPQ< / a > , < a class = "el" href = "structfaiss_1_1IndexShards.html#a1f771d50133494f682f05c9ab9e39ad9" > faiss::IndexShards< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a99c11ab640b70725d5975763e7393894" > faiss::gpu::GpuIndexIVFFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a981c2748bfbd9b018494f119279a0342" > faiss::IndexIVFPQ< / a > , and < a class = "el" href = "structfaiss_1_1IndexIDMap.html#aeace75e53648c052d05c357b744e090b" > faiss::IndexIDMap< / a > .< / p >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00032" > 32< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "a8bc5d8d1cd0dd7b34b3c98a9f76b4a9c" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::assign < / 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 > labels< / 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 > = < code > 1< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > return the indexes of the k vectors closest to the query x.< / p >
< p > This function is identical as search but only return labels of neighbors. < / 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 >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00024" > 24< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "aaae77608bbda70b1098897e9167a82f9" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::compute_residual < / 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" > float *  < / td >
< td class = "paramname" > < em > residual< / 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 > key< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Computes a residual vector after indexing encoding.< / p >
< p > The residual vector is the difference between a vector and the reconstruction that can be decoded from its representation in the index. The residual can be used for multiple-stage indexing methods, like < a class = "el" href = "structfaiss_1_1IndexIVF.html" > IndexIVF< / a > 's methods.< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > x< / td > < td > input vector, size d < / td > < / tr >
< tr > < td class = "paramname" > residual< / td > < td > output residual vector, size d < / td > < / tr >
< tr > < td class = "paramname" > key< / td > < td > encoded index, as returned by search and assign < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00058" > 58< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "a373c30e3d87d1d4e616f450d87152b1a" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::display < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Display the actual class name and some more info < / p >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00066" > 66< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "aae095c6209a16347262408b3346193a3" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual std::string faiss::Index::get_typename < / td >
< td > (< / td >
< td class = "paramname" > < / td > < td > )< / td >
< td > const< / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Return the typeName of the index (which includes main parameters < / p >
< p > Definition at line < a class = "el" href = "Index_8h_source.html#l00188" > 188< / a > of file < a class = "el" href = "Index_8h_source.html" > Index.h< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "a236897832a58dbb205e2d662c1929fb1" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::range_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" > float  < / td >
< td class = "paramname" > < em > radius< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > < a class = "el" href = "structfaiss_1_1RangeSearchResult.html" > RangeSearchResult< / a > *  < / td >
< td class = "paramname" > < em > result< / 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" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > query n vectors of dimension d to the index.< / p >
< p > return all vectors with distance < radius. Note that many indexes do not implement the range_search (only the k-NN search is mandatory).< / 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" > radius< / td > < td > search radius < / td > < / tr >
< tr > < td class = "paramname" > result< / td > < td > result table < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFFlat.html#ad2b306f160e153b5cfb572cf1d8ece24" > faiss::IndexIVFFlat< / a > , and < a class = "el" href = "structfaiss_1_1IndexFlat.html#ac56b7ed90ab65fab9c586a1e56006d12" > faiss::IndexFlat< / a > .< / p >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00018" > 18< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "aaef6f4132b1f390121ebb11058baf190" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::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" > 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 >
2017-03-21 01:33:21 +08:00
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFFlat.html#af7aa8b40cae6d50317049a252df8fb44" > faiss::IndexIVFFlat< / a > , < a class = "el" href = "structfaiss_1_1MultiIndexQuantizer.html#aa59a6252d445a6226aeab4ed8489d9d2" > faiss::MultiIndexQuantizer< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexFlat.html#a7f1cdf03d3545a43fc91bb5cace3b6fd" > faiss::gpu::GpuIndexFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a28ce697b1381eb7e7d7d25774a25e175" > faiss::IndexIVFPQ< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1IndexProxy.html#a8bf6d513b4f41fb533f0d023c1e143ba" > faiss::gpu::IndexProxy< / a > , < a class = "el" href = "structfaiss_1_1IndexPQ.html#a20913df3bfd8caa5187112641e8d9bc7" > faiss::IndexPQ< / a > , and < a class = "el" href = "structfaiss_1_1IndexFlat.html#ae4b33315752b62cff1626f9f967167b1" > faiss::IndexFlat< / a > .< / p >
2017-02-23 06:26:44 +08:00
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00045" > 45< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "a1936604fffe16b0ef2a3879305950738" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > void faiss::Index::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" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Reconstruct vectors i0 to i0 + ni - 1< / 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" > recons< / td > < td > reconstucted vector (size ni * d) < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#a370dd6ef091393401fa9b60e3d1d25b2" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a0f0d8fc6b2c6aa2431c1730111a3b22a" > faiss::IndexIVFPQR< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexFlat.html#a472732e9bd8ffb1aa4c3abc31063dd28" > faiss::gpu::GpuIndexFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#a1df10e9e5f4ff0dabf283f19ad94bbd4" > faiss::IndexIVFPQ< / a > , and < a class = "el" href = "structfaiss_1_1IndexPQ.html#a99b187b1231a700617f7b228ec348ade" > faiss::IndexPQ< / a > .< / p >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00050" > 50< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "af8bf7bd97aeed8ad5fc48b242379a68a" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > long faiss::Index::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" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > removes IDs from the index. Not supported by all indexes < / p >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#ad4e59f4dacc1d8183a788510680f0df5" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#acc5eeeeb8ac8d2581ef07947932d9f6c" > faiss::IndexIVFPQR< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFFlat.html#a46ee62aabc316ec38882a3f54e594559" > faiss::IndexIVFFlat< / a > , and < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#ad9fa584ac2e12e9b9bb25a737efcc4d9" > faiss::IndexIVFPQ< / a > .< / p >
< p > Definition at line < a class = "el" href = "Index_8cpp_source.html#l00038" > 38< / a > of file < a class = "el" href = "Index_8cpp_source.html" > Index.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "aced51b1ebc33c47ab3ae15ea906559a7" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual void faiss::Index::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" > pure 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 >
2017-03-21 01:33:21 +08:00
< p > Implemented in < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#a7c2c820895d87083742969c281ae4911" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQR.html#a3e982ee6f1a3a025148270701867d04f" > faiss::IndexIVFPQR< / a > , < a class = "el" href = "structfaiss_1_1IndexFlat1D.html#a65736f2900865cd156faba4fcd260d05" > faiss::IndexFlat1D< / a > , < a class = "el" href = "structfaiss_1_1MultiIndexQuantizer.html#a078f1824235ee3199c5fdef3e84a1f52" > faiss::MultiIndexQuantizer< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFFlat.html#acd2bdb06fcbe9d1f5799cf78aa6cdf0d" > faiss::IndexIVFFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexRefineFlat.html#ad04444de1e2c26c463cc52f3c076dd41" > faiss::IndexRefineFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexSplitVectors.html#a4a010daf51e44d9717e94400cc23c159" > faiss::IndexSplitVectors< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFPQ.html#a451d60fe221545234f55cf7ed65b5d26" > faiss::gpu::GpuIndexIVFPQ< / a > , < a class = "el" href = "structfaiss_1_1IndexFlatL2BaseShift.html#a16e9bf1aec9d18b3ebbe78fea6bfecc0" > faiss::IndexFlatL2BaseShift< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexFlat.html#ac0f0301829363f920e619f673a4d97f3" > faiss::gpu::GpuIndexFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexShards.html#a83391295650370e8987358a898bb2cca" > faiss::IndexShards< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#ad101d8f209f3a269ef75d8d5797ec56f" > faiss::gpu::GpuIndexIVFFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexIVFPQ.html#afa7c9a7ae0316d2a05acb60ab2b7a31a" > faiss::IndexIVFPQ< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1IndexProxy.html#a25ed68079907eeeca9d441cdd4fc0740" > faiss::gpu::IndexProxy< / a > , < a class = "el" href = "structfaiss_1_1IndexLSH.html#a66b6afb56afa1f58e2d93abfdfd223ee" > faiss::IndexLSH< / a > , < a class = "el" href = "structfaiss_1_1IndexPQ.html#a491ba3ed34093513e6a850fbca0abdd2" > faiss::IndexPQ< / a > , < a class = "el" href = "structfaiss_1_1IndexIDMap.html#a2f36fa9150a465b48952afbba856e2a1" > faiss::IndexIDMap< / a > , and < a class = "el" href = "structfaiss_1_1IndexFlat.html#a85510d70f4675197df9988651e4692c9" > faiss::IndexFlat< / a > .< / p >
2017-02-23 06:26:44 +08:00
< / div >
< / div >
< a class = "anchor" id = "a8f67dfd73993e192dc78f2c93d9d9532" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual void faiss::Index::train < / 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 > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / td >
< td class = "mlabels-right" >
< span class = "mlabels" > < span class = "mlabel" > inline< / span > < span class = "mlabel" > virtual< / span > < / span > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > Perform training on a representative set of vectors< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > n< / td > < td > nb of training vectors < / td > < / tr >
< tr > < td class = "paramname" > x< / td > < td > training vecors, size n * d < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Reimplemented in < a class = "el" href = "structfaiss_1_1IndexIVFPQCompact.html#a0ef8132fae22a50616fe1201c8b20588" > faiss::IndexIVFPQCompact< / a > , < a class = "el" href = "structfaiss_1_1IndexPreTransform.html#a416aaf28d7a533dcf7d2d7de434e993c" > faiss::IndexPreTransform< / a > , < a class = "el" href = "structfaiss_1_1MultiIndexQuantizer.html#ac7943184d37e953cb0c1ab589202afa8" > faiss::MultiIndexQuantizer< / a > , < a class = "el" href = "structfaiss_1_1IndexSplitVectors.html#aafa4c780e325855fe247052453967845" > faiss::IndexSplitVectors< / a > , < a class = "el" href = "structfaiss_1_1IndexRefineFlat.html#a79c4c9b9ffabc4460ef4def6eb962e68" > faiss::IndexRefineFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexShards.html#a36fbcc85eed9bf2ea15587f04be9ae0b" > faiss::IndexShards< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFPQ.html#ac4814acafa4bc340a4c4bdcafd469b56" > faiss::gpu::GpuIndexIVFPQ< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexFlat.html#a0e74fad76628ddfb5ae3dc1d1c69f7e8" > faiss::gpu::GpuIndexFlat< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1GpuIndexIVFFlat.html#a3c5b3760acb01814892fe93c72f08304" > faiss::gpu::GpuIndexIVFFlat< / a > , < a class = "el" href = "structfaiss_1_1IndexIVF.html#a7a1d5eec194db0977b2318c6ed6a2b86" > faiss::IndexIVF< / a > , < a class = "el" href = "structfaiss_1_1IndexLSH.html#a01f569a16a812aa3945b8a0b64eaff06" > faiss::IndexLSH< / a > , < a class = "el" href = "classfaiss_1_1gpu_1_1IndexProxy.html#aee6fe7e95b02238103a6a2d1f6d2cd00" > faiss::gpu::IndexProxy< / a > , < a class = "el" href = "structfaiss_1_1IndexPQ.html#a87898add5ab4d86ba901ca79778fc11e" > faiss::IndexPQ< / a > , and < a class = "el" href = "structfaiss_1_1IndexIDMap.html#ac873cb03aa323a06dca5d6f3af5fe559" > faiss::IndexIDMap< / a > .< / p >
< p > Definition at line < a class = "el" href = "Index_8h_source.html#l00092" > 92< / a > of file < a class = "el" href = "Index_8h_source.html" > Index.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 = "Index_8h_source.html" > Index.h< / a > < / li >
< li > /data/users/matthijs/github_faiss/faiss/< a class = "el" href = "Index_8cpp_source.html" > Index.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 >