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::HeapArray< C > Struct Template 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_1HeapArray.html" > HeapArray< / 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_1HeapArray-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::HeapArray< C > Struct Template Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "Heap_8h_source.html" > Heap.h< / a > > < / code > < / p >
< 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:a284762db4e64dd74d82984b6b457304a" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a284762db4e64dd74d82984b6b457304a" > < / a >
typedef C::TI  < / td > < td class = "memItemRight" valign = "bottom" > < b > TI< / b > < / td > < / tr >
< tr class = "separator:a284762db4e64dd74d82984b6b457304a" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a46eb2eae9e79a0dd7ab720283619a5a9" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a46eb2eae9e79a0dd7ab720283619a5a9" > < / a >
typedef C::T  < / td > < td class = "memItemRight" valign = "bottom" > < b > T< / b > < / td > < / tr >
< tr class = "separator:a46eb2eae9e79a0dd7ab720283619a5a9" > < 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:ae97911f6f85d152a5b45e459063b6858" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ae97911f6f85d152a5b45e459063b6858" > < / a >
T *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#ae97911f6f85d152a5b45e459063b6858" > get_val< / a > (size_t key)< / td > < / tr >
< tr class = "memdesc:ae97911f6f85d152a5b45e459063b6858" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Return the list of values for a heap. < br / > < / td > < / tr >
< tr class = "separator:ae97911f6f85d152a5b45e459063b6858" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:af6aa57addaa1bc754d09a2a08be4df49" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "af6aa57addaa1bc754d09a2a08be4df49" > < / a >
TI *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#af6aa57addaa1bc754d09a2a08be4df49" > get_ids< / a > (size_t key)< / td > < / tr >
< tr class = "memdesc:af6aa57addaa1bc754d09a2a08be4df49" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Correspponding identifiers. < br / > < / td > < / tr >
< tr class = "separator:af6aa57addaa1bc754d09a2a08be4df49" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a48afc496c73e982b8e10fde786628292" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a48afc496c73e982b8e10fde786628292" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#a48afc496c73e982b8e10fde786628292" > heapify< / a > ()< / td > < / tr >
< tr class = "memdesc:a48afc496c73e982b8e10fde786628292" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > prepare all the heaps before adding < br / > < / td > < / tr >
< tr class = "separator:a48afc496c73e982b8e10fde786628292" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abc3e17a9d369abc87353bccf07f7a4fc" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#abc3e17a9d369abc87353bccf07f7a4fc" > addn< / a > (size_t nj, const T *vin, TI j0=0, size_t i0=0, long ni=-1)< / td > < / tr >
< tr class = "separator:abc3e17a9d369abc87353bccf07f7a4fc" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ad3c61085b43dd54300ad97f1f9503330" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#ad3c61085b43dd54300ad97f1f9503330" > addn_with_ids< / a > (size_t nj, const T *vin, const TI *id_in=nullptr, long id_stride=0, size_t i0=0, long ni=-1)< / td > < / tr >
< tr class = "separator:ad3c61085b43dd54300ad97f1f9503330" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a3c686b3cc0594e6a284fa3a595bebdec" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a3c686b3cc0594e6a284fa3a595bebdec" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#a3c686b3cc0594e6a284fa3a595bebdec" > reorder< / a > ()< / td > < / tr >
< tr class = "memdesc:a3c686b3cc0594e6a284fa3a595bebdec" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > reorder all the heaps < br / > < / td > < / tr >
< tr class = "separator:a3c686b3cc0594e6a284fa3a595bebdec" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab1beefd73c023168c23d5443ee71e369" > < td class = "memItemLeft" align = "right" valign = "top" > void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#ab1beefd73c023168c23d5443ee71e369" > per_line_extrema< / a > (T *vals_out, TI *idx_out) const < / td > < / tr >
< tr class = "separator:ab1beefd73c023168c23d5443ee71e369" > < 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:aad477a3907c3496159eaf4b375be4432" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "aad477a3907c3496159eaf4b375be4432" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#aad477a3907c3496159eaf4b375be4432" > nh< / a > < / td > < / tr >
< tr class = "memdesc:aad477a3907c3496159eaf4b375be4432" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > number of heaps < br / > < / td > < / tr >
< tr class = "separator:aad477a3907c3496159eaf4b375be4432" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1ee98429c766c77235f78c6d9aa32bb4" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a1ee98429c766c77235f78c6d9aa32bb4" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#a1ee98429c766c77235f78c6d9aa32bb4" > k< / a > < / td > < / tr >
< tr class = "memdesc:a1ee98429c766c77235f78c6d9aa32bb4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > allocated size per heap < br / > < / td > < / tr >
< tr class = "separator:a1ee98429c766c77235f78c6d9aa32bb4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a22332dd179ce70e379addeaa47246cc2" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a22332dd179ce70e379addeaa47246cc2" > < / a >
TI *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#a22332dd179ce70e379addeaa47246cc2" > ids< / a > < / td > < / tr >
< tr class = "memdesc:a22332dd179ce70e379addeaa47246cc2" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > identifiers (size nh * k) < br / > < / td > < / tr >
< tr class = "separator:a22332dd179ce70e379addeaa47246cc2" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a4b131abb659e7d0ee315223270deac53" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a4b131abb659e7d0ee315223270deac53" > < / a >
T *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1HeapArray.html#a4b131abb659e7d0ee315223270deac53" > val< / a > < / td > < / tr >
< tr class = "memdesc:a4b131abb659e7d0ee315223270deac53" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > values (distances or similarities), size nh * k < br / > < / td > < / tr >
< tr class = "separator:a4b131abb659e7d0ee315223270deac53" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < h3 > template< typename C> < br / >
struct faiss::HeapArray< C > < / h3 >
< p > a template structure for a set of [min|max]-heaps it is tailored so that the actual data of the heaps can just live in compact arrays. < / p >
< p > Definition at line < a class = "el" href = "Heap_8h_source.html#l00351" > 351< / a > of file < a class = "el" href = "Heap_8h_source.html" > Heap.h< / a > .< / p >
< / div > < h2 class = "groupheader" > Member Function Documentation< / h2 >
< a class = "anchor" id = "abc3e17a9d369abc87353bccf07f7a4fc" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename C > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > void < a class = "el" href = "structfaiss_1_1HeapArray.html" > faiss::HeapArray< / a > < C > ::addn < / td >
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > nj< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const T *  < / td >
< td class = "paramname" > < em > vin< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > TI  < / td >
< td class = "paramname" > < em > j0< / em > = < code > 0< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > i0< / em > = < code > 0< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long  < / td >
< td class = "paramname" > < em > ni< / em > = < code > -1< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > add nj elements to heaps i0:i0+ni, with sequential ids< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > nj< / td > < td > nb of elements to add to each heap < / td > < / tr >
< tr > < td class = "paramname" > vin< / td > < td > elements to add, size ni * nj < / td > < / tr >
< tr > < td class = "paramname" > j0< / td > < td > add this to the ids that are added < / td > < / tr >
< tr > < td class = "paramname" > i0< / td > < td > first heap to update < / td > < / tr >
< tr > < td class = "paramname" > ni< / td > < td > nb of elements to update (-1 = use nh) < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "Heap_8cpp_source.html#l00043" > 43< / a > of file < a class = "el" href = "Heap_8cpp_source.html" > Heap.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "ad3c61085b43dd54300ad97f1f9503330" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename C > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > void < a class = "el" href = "structfaiss_1_1HeapArray.html" > faiss::HeapArray< / a > < C > ::addn_with_ids < / td >
< td > (< / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > nj< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const T *  < / td >
< td class = "paramname" > < em > vin< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > const TI *  < / td >
< td class = "paramname" > < em > id_in< / em > = < code > nullptr< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long  < / td >
< td class = "paramname" > < em > id_stride< / em > = < code > 0< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > size_t  < / td >
< td class = "paramname" > < em > i0< / em > = < code > 0< / code > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > long  < / td >
< td class = "paramname" > < em > ni< / em > = < code > -1< / code >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > < / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > same as addn< / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > id_in< / td > < td > ids of the elements to add, size ni * nj < / td > < / tr >
< tr > < td class = "paramname" > id_stride< / td > < td > stride for id_in < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "Heap_8cpp_source.html#l00065" > 65< / a > of file < a class = "el" href = "Heap_8cpp_source.html" > Heap.cpp< / a > .< / p >
< / div >
< / div >
< a class = "anchor" id = "ab1beefd73c023168c23d5443ee71e369" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< div class = "memtemplate" >
template< typename C > < / div >
< table class = "memname" >
< tr >
< td class = "memname" > void < a class = "el" href = "structfaiss_1_1HeapArray.html" > faiss::HeapArray< / a > < C > ::per_line_extrema < / td >
< td > (< / td >
< td class = "paramtype" > T *  < / td >
< td class = "paramname" > < em > vals_out< / em > , < / td >
< / tr >
< tr >
< td class = "paramkey" > < / td >
< td > < / td >
< td class = "paramtype" > TI *  < / td >
< td class = "paramname" > < em > idx_out< / em >   < / td >
< / tr >
< tr >
< td > < / td >
< td > )< / td >
< td > < / td > < td > const< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > this is not really a heap function. It just finds the per-line extrema of each line of array D < / p >
< dl class = "params" > < dt > Parameters< / dt > < dd >
< table class = "params" >
< tr > < td class = "paramname" > vals_out< / td > < td > extreme value of each line (size nh, or NULL) < / td > < / tr >
< tr > < td class = "paramname" > idx_out< / td > < td > index of extreme value (size nh or NULL) < / td > < / tr >
< / table >
< / dd >
< / dl >
< p > Definition at line < a class = "el" href = "Heap_8cpp_source.html#l00093" > 93< / a > of file < a class = "el" href = "Heap_8cpp_source.html" > Heap.cpp< / 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 = "Heap_8h_source.html" > Heap.h< / a > < / li >
< li > /data/users/matthijs/github_faiss/faiss/< a class = "el" href = "Heap_8cpp_source.html" > Heap.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 >