Permalink
Fetching contributors…
Cannot retrieve contributors at this time
264 lines (225 sloc) 15.9 KB
<!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"/>
<title>STX B+ Tree Template Classes: stx::btree_default_set_traits&lt; _Key &gt; Struct Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">STX B+ Tree Template Classes
&#160;<span id="projectnumber">0.9</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Generated by Doxygen 1.7.6.1 -->
<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&#160;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&#160;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</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="a00036.html">stx</a> </li>
<li class="navelem"><a class="el" href="a00003.html">btree_default_set_traits</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#pub-static-attribs">Static Public Attributes</a> </div>
<div class="headertitle">
<div class="title">stx::btree_default_set_traits&lt; _Key &gt; Struct Template Reference</div> </div>
</div><!--header-->
<div class="contents">
<!-- doxytag: class="stx::btree_default_set_traits" -->
<p>Generates default traits for a B+ tree used as a set.
<a href="a00003.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="a00026_source.html">btree.h</a>&gt;</code></p>
<p><a href="a00038.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html#abbb0859c6f7a2b887863011026e28ab1">selfverify</a> = false</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, the tree will self verify it's invariants after each insert() or erase(). <a href="#abbb0859c6f7a2b887863011026e28ab1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html#ab06ff26a50cb57614ddaf1096b2871bb">debug</a> = false</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">If true, the tree will print out debug information and a tree dump during insert() or erase() operation. <a href="#ab06ff26a50cb57614ddaf1096b2871bb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html#ab0bbc6a8fdfa17275dab38f5a9c80efc">leafslots</a> = <a class="el" href="a00026.html#a5d7b0c98bc4c3029d6d76199caa35b19">BTREE_MAX</a>( 8, 256 / (sizeof(_Key)) )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of slots in each leaf of the tree. <a href="#ab0bbc6a8fdfa17275dab38f5a9c80efc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html#a1a1e1c183cffd510e3fc7e71076bad2b">innerslots</a> = <a class="el" href="a00026.html#a5d7b0c98bc4c3029d6d76199caa35b19">BTREE_MAX</a>( 8, 256 / (sizeof(_Key) + sizeof(void*)) )</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of slots in each inner node of the tree. <a href="#a1a1e1c183cffd510e3fc7e71076bad2b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00003.html#a5f30b3761385f6d26acbd2ad1f91c95a">binsearch_threshold</a> = 256</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">As of stx-btree-0.9, the code does linear search in find_lower() and find_upper() instead of binary_search, unless the node size is larger than this threshold. <a href="#a5f30b3761385f6d26acbd2ad1f91c95a"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename _Key&gt;<br/>
struct stx::btree_default_set_traits&lt; _Key &gt;</h3>
<p>Generates default traits for a B+ tree used as a set. </p>
<p>It estimates leaf and inner node sizes by assuming a cache line size of 256 bytes. </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00086">86</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div><hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a5f30b3761385f6d26acbd2ad1f91c95a"></a><!-- doxytag: member="stx::btree_default_set_traits::binsearch_threshold" ref="a5f30b3761385f6d26acbd2ad1f91c95a" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Key &gt; </div>
<table class="memname">
<tr>
<td class="memname">const size_t <a class="el" href="a00003.html">stx::btree_default_set_traits</a>&lt; _Key &gt;::<a class="el" href="a00003.html#a5f30b3761385f6d26acbd2ad1f91c95a">binsearch_threshold</a> = 256<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>As of stx-btree-0.9, the code does linear search in find_lower() and find_upper() instead of binary_search, unless the node size is larger than this threshold. </p>
<p>See notes at <a href="http://panthema.net/2013/0504-STX-B+Tree-Binary-vs-Linear-Search">http://panthema.net/2013/0504-STX-B+Tree-Binary-vs-Linear-Search</a> </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00110">110</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab06ff26a50cb57614ddaf1096b2871bb"></a><!-- doxytag: member="stx::btree_default_set_traits::debug" ref="ab06ff26a50cb57614ddaf1096b2871bb" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Key &gt; </div>
<table class="memname">
<tr>
<td class="memname">const bool <a class="el" href="a00003.html">stx::btree_default_set_traits</a>&lt; _Key &gt;::<a class="el" href="a00003.html#ab06ff26a50cb57614ddaf1096b2871bb">debug</a> = false<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>If true, the tree will print out debug information and a tree dump during insert() or erase() operation. </p>
<p>The header must have been compiled with BTREE_DEBUG defined and key_type must be std::ostream printable. </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00096">96</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div>
</div>
<a class="anchor" id="a1a1e1c183cffd510e3fc7e71076bad2b"></a><!-- doxytag: member="stx::btree_default_set_traits::innerslots" ref="a1a1e1c183cffd510e3fc7e71076bad2b" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Key &gt; </div>
<table class="memname">
<tr>
<td class="memname">const int <a class="el" href="a00003.html">stx::btree_default_set_traits</a>&lt; _Key &gt;::<a class="el" href="a00003.html#a1a1e1c183cffd510e3fc7e71076bad2b">innerslots</a> = <a class="el" href="a00026.html#a5d7b0c98bc4c3029d6d76199caa35b19">BTREE_MAX</a>( 8, 256 / (sizeof(_Key) + sizeof(void*)) )<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of slots in each inner node of the tree. </p>
<p>Estimated so that each node has a size of about 256 bytes. </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00104">104</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div>
</div>
<a class="anchor" id="ab0bbc6a8fdfa17275dab38f5a9c80efc"></a><!-- doxytag: member="stx::btree_default_set_traits::leafslots" ref="ab0bbc6a8fdfa17275dab38f5a9c80efc" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Key &gt; </div>
<table class="memname">
<tr>
<td class="memname">const int <a class="el" href="a00003.html">stx::btree_default_set_traits</a>&lt; _Key &gt;::<a class="el" href="a00003.html#ab0bbc6a8fdfa17275dab38f5a9c80efc">leafslots</a> = <a class="el" href="a00026.html#a5d7b0c98bc4c3029d6d76199caa35b19">BTREE_MAX</a>( 8, 256 / (sizeof(_Key)) )<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>Number of slots in each leaf of the tree. </p>
<p>Estimated so that each node has a size of about 256 bytes. </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00100">100</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div>
</div>
<a class="anchor" id="abbb0859c6f7a2b887863011026e28ab1"></a><!-- doxytag: member="stx::btree_default_set_traits::selfverify" ref="abbb0859c6f7a2b887863011026e28ab1" args="" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename _Key &gt; </div>
<table class="memname">
<tr>
<td class="memname">const bool <a class="el" href="a00003.html">stx::btree_default_set_traits</a>&lt; _Key &gt;::<a class="el" href="a00003.html#abbb0859c6f7a2b887863011026e28ab1">selfverify</a> = false<code> [static]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>If true, the tree will self verify it's invariants after each insert() or erase(). </p>
<p>The header must have been compiled with BTREE_DEBUG defined. </p>
<p>Definition at line <a class="el" href="a00026_source.html#l00090">90</a> of file <a class="el" href="a00026_source.html">btree.h</a>.</p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>stx/<a class="el" href="a00026_source.html">btree.h</a></li>
</ul>
</div><!-- contents -->
<!-- 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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</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>
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 5 2013 23:38:43 for STX B+ Tree Template Classes by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>
</body>
</html>