2018-01-09 22:44:43 +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::Level1Quantizer 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_1Level1Quantizer.html" > Level1Quantizer< / 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_1Level1Quantizer-members.html" > List of all members< / a > < / div >
< div class = "headertitle" >
< div class = "title" > faiss::Level1Quantizer Struct Reference< / div > < / div >
< / div > <!-- header -->
< div class = "contents" >
< p > < code > #include < < a class = "el" href = "IndexIVF_8h_source.html" > IndexIVF.h< / a > > < / code > < / p >
< div class = "dynheader" >
Inheritance diagram for faiss::Level1Quantizer:< / div >
< div class = "dyncontent" >
< div class = "center" >
< img src = "structfaiss_1_1Level1Quantizer.png" usemap = "#faiss::Level1Quantizer_map" alt = "" / >
< map id = "faiss::Level1Quantizer_map" name = "faiss::Level1Quantizer_map" >
< area href = "structfaiss_1_1IndexIVF.html" alt = "faiss::IndexIVF" shape = "rect" coords = "196,56,382,80" / >
< area href = "structfaiss_1_1IndexIVFFlat.html" alt = "faiss::IndexIVFFlat" shape = "rect" coords = "0,112,186,136" / >
< area href = "structfaiss_1_1IndexIVFPQ.html" alt = "faiss::IndexIVFPQ" shape = "rect" coords = "196,112,382,136" / >
< area href = "structfaiss_1_1IndexIVFScalarQuantizer.html" alt = "faiss::IndexIVFScalarQuantizer" shape = "rect" coords = "392,112,578,136" / >
2018-12-20 00:48:35 +08:00
< area href = "structfaiss_1_1IndexIVFFlatDedup.html" alt = "faiss::IndexIVFFlatDedup" shape = "rect" coords = "0,168,186,192" / >
2018-02-23 23:44:31 +08:00
< area href = "structfaiss_1_1IndexIVFPQR.html" alt = "faiss::IndexIVFPQR" shape = "rect" coords = "196,168,382,192" / >
2018-01-09 22:44:43 +08:00
< / 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:a0069a6ee1e32c2e0c1c7df9a95740dd4" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a0069a6ee1e32c2e0c1c7df9a95740dd4" > < / a >
void  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a0069a6ee1e32c2e0c1c7df9a95740dd4" > train_q1< / a > (size_t n, const float *x, bool verbose, < a class = "el" href = "namespacefaiss.html#afd12191c638da74760ff397cf319752c" > MetricType< / a > metric_type)< / td > < / tr >
< tr class = "memdesc:a0069a6ee1e32c2e0c1c7df9a95740dd4" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > Trains the quantizer and calls train_residual to train sub-quantizers. < br / > < / td > < / tr >
< tr class = "separator:a0069a6ee1e32c2e0c1c7df9a95740dd4" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a7262e1eb542b177308dab0c043e90d01" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a7262e1eb542b177308dab0c043e90d01" > < / a >
  < / td > < td class = "memItemRight" valign = "bottom" > < b > Level1Quantizer< / b > (< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *< a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a3cf99e2ee92b8558a066f821efab95d5" > quantizer< / a > , size_t < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a1c4fc9d874d9492ee0ea27a5be388fa7" > nlist< / a > )< / td > < / tr >
< tr class = "separator:a7262e1eb542b177308dab0c043e90d01" > < 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:a3cf99e2ee92b8558a066f821efab95d5" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a3cf99e2ee92b8558a066f821efab95d5" > < / a >
< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a3cf99e2ee92b8558a066f821efab95d5" > quantizer< / a > < / td > < / tr >
< tr class = "memdesc:a3cf99e2ee92b8558a066f821efab95d5" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > quantizer that maps vectors to inverted lists < br / > < / td > < / tr >
< tr class = "separator:a3cf99e2ee92b8558a066f821efab95d5" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1c4fc9d874d9492ee0ea27a5be388fa7" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a1c4fc9d874d9492ee0ea27a5be388fa7" > < / a >
size_t  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a1c4fc9d874d9492ee0ea27a5be388fa7" > nlist< / a > < / td > < / tr >
< tr class = "memdesc:a1c4fc9d874d9492ee0ea27a5be388fa7" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > number of possible key values < br / > < / td > < / tr >
< tr class = "separator:a1c4fc9d874d9492ee0ea27a5be388fa7" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a1dcea762fc322fdcffe64f78994edea0" > < td class = "memItemLeft" align = "right" valign = "top" > char  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a1dcea762fc322fdcffe64f78994edea0" > quantizer_trains_alone< / a > < / td > < / tr >
< tr class = "separator:a1dcea762fc322fdcffe64f78994edea0" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:ab688c629cd42122d73517078b87f483d" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "ab688c629cd42122d73517078b87f483d" > < / a >
bool  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#ab688c629cd42122d73517078b87f483d" > own_fields< / a > < / td > < / tr >
< tr class = "memdesc:ab688c629cd42122d73517078b87f483d" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > whether object owns the quantizer < br / > < / td > < / tr >
< tr class = "separator:ab688c629cd42122d73517078b87f483d" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:abb7097ed40b15ba0af08af6d03608f72" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "abb7097ed40b15ba0af08af6d03608f72" > < / a >
< a class = "el" href = "structfaiss_1_1ClusteringParameters.html" > ClusteringParameters< / a >   < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#abb7097ed40b15ba0af08af6d03608f72" > cp< / a > < / td > < / tr >
< tr class = "memdesc:abb7097ed40b15ba0af08af6d03608f72" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > to override default clustering params < br / > < / td > < / tr >
< tr class = "separator:abb7097ed40b15ba0af08af6d03608f72" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< tr class = "memitem:a45d29dd6a5c53789c08e5ceb3f63d989" > < td class = "memItemLeft" align = "right" valign = "top" > < a class = "anchor" id = "a45d29dd6a5c53789c08e5ceb3f63d989" > < / a >
< a class = "el" href = "structfaiss_1_1Index.html" > Index< / a > *  < / td > < td class = "memItemRight" valign = "bottom" > < a class = "el" href = "structfaiss_1_1Level1Quantizer.html#a45d29dd6a5c53789c08e5ceb3f63d989" > clustering_index< / a > < / td > < / tr >
< tr class = "memdesc:a45d29dd6a5c53789c08e5ceb3f63d989" > < td class = "mdescLeft" >   < / td > < td class = "mdescRight" > to override index used during clustering < br / > < / td > < / tr >
< tr class = "separator:a45d29dd6a5c53789c08e5ceb3f63d989" > < td class = "memSeparator" colspan = "2" >   < / td > < / tr >
< / table >
< a name = "details" id = "details" > < / a > < h2 class = "groupheader" > Detailed Description< / h2 >
< div class = "textblock" > < p > Encapsulates a quantizer object for the < a class = "el" href = "structfaiss_1_1IndexIVF.html" > IndexIVF< / a > < / p >
< p > The class isolates the fields that are independent of the storage of the lists (especially training) < / p >
< p > Definition at line < a class = "el" href = "IndexIVF_8h_source.html#l00032" > 32< / a > of file < a class = "el" href = "IndexIVF_8h_source.html" > IndexIVF.h< / a > .< / p >
< / div > < h2 class = "groupheader" > Member Data Documentation< / h2 >
< a class = "anchor" id = "a1dcea762fc322fdcffe64f78994edea0" > < / a >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > char faiss::Level1Quantizer::quantizer_trains_alone< / td >
< / tr >
< / table >
< / div > < div class = "memdoc" >
< p > = 0: use the quantizer as index in a kmeans training = 1: just pass on the training set to the train() of the quantizer = 2: kmeans training on a flat index + add the centroids to the quantizer < / p >
< p > Definition at line < a class = "el" href = "IndexIVF_8h_source.html#l00041" > 41< / a > of file < a class = "el" href = "IndexIVF_8h_source.html" > IndexIVF.h< / a > .< / p >
< / div >
< / div >
< hr / > The documentation for this struct was generated from the following files:< ul >
2018-12-20 00:48:35 +08:00
< li > /tmp/faiss/< a class = "el" href = "IndexIVF_8h_source.html" > IndexIVF.h< / a > < / li >
< li > /tmp/faiss/< a class = "el" href = "IndexIVF_8cpp_source.html" > IndexIVF.cpp< / a > < / li >
2018-01-09 22:44:43 +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 >