1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 5<head> 6 <meta name="generator" content= 7 "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" /> 8 9 <title>hash_exponential_size_policy Interface</title> 10 <meta http-equiv="Content-Type" content= 11 "text/html; charset=us-ascii" /> 12 </head> 13 14<body> 15 <div id="page"> 16 <h1><tt>hash_exponential_size_policy</tt> Interface</h1> 17 18 <p>A size policy whose sequence of sizes form an exponential 19 sequence (typically powers of 2)</p> 20 21 <p>Defined in: <a href= 22 "http://gcc.gnu.org/viewcvs/*checkout*/trunk/libstdc%2B%2B-v3/include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p> 23 24 <h2><a name="link1" id="link1">Template Parameters</a></h2> 25 26 <table class="c1" width="100%" border="1" summary= 27 "Template Parameters"> 28 <tr> 29 <td width="20%" align="left"><b>Parameter</b></td> 30 31 <td width="50%" align="left"><b>Description</b></td> 32 33 <td width="30%" align="left"><b>Default Value</b></td> 34 </tr> 35 36 <tr> 37 <td> 38 <pre> 39<a name="Size_Type42920436" id= 40"Size_Type42920436"><b>typename</b> Size_Type </a> 41</pre> 42 </td> 43 44 <td> 45 <p>Size type.</p> 46 </td> 47 48 <td>size_t</td> 49 </tr> 50 </table> 51 52 <h2><a name="link2" id="link2">Public Types and 53 Constants</a></h2> 54 55 <h3><a name="link3" id="link3">General Definitions</a></h3> 56 57 <table class="c1" width="100%" border="1" summary="Types"> 58 <tr> 59 <td width="30%" align="left"><b>Type</b></td> 60 61 <td width="55%" align="left"><b>Definition</b></td> 62 63 <td width="15%" align="left"><b>Description</b></td> 64 </tr> 65 66 <tr> 67 <td> 68 <pre> 69<a name="size_type55424436" id="size_type55424436">size_type</a> 70</pre> 71 </td> 72 73 <td> 74 <pre> 75<a href="#Size_Type42920436"><tt>Size_Type</tt></a> 76</pre> 77 </td> 78 79 <td> 80 <p>Size type.</p> 81 </td> 82 </tr> 83 </table> 84 85 <h2><a name="link4" id="link4">Public Methods</a></h2> 86 87 <h3><a name="link5" id="link5">Constructors, Destructor, and 88 Related</a></h3> 89 90 <table class="c1" width="100%" border="1" summary="Methods"> 91 <tr> 92 <td width="45%" align="left"><b>Method</b></td> 93 94 <td width="55%" align="left"><b>Description</b></td> 95 </tr> 96 97 <tr> 98 <td> 99 <pre> 100 hash_exponential_size_policy 101 (<a href= 102"#size_type55424436"><tt>size_type</tt></a> start_size = 8, 103 <a href= 104"#size_type55424436"><tt>size_type</tt></a> grow_factor = 2) 105</pre> 106 </td> 107 108 <td> 109 <p>Default constructor, or constructor taking a 110 <span class="c1"><tt>start_size</tt></span>, or 111 constructor taking a start size and <span class= 112 "c1"><tt>grow_factor</tt></span>. The policy will use the 113 sequence of sizes <span class= 114 "c1"><tt>start_size</tt></span>, <span class= 115 "c1"><tt>start_size</tt></span> * <span class= 116 "c1"><tt>grow_factor</tt></span>, <span class= 117 "c1"><tt>start_size</tt></span> * <span class= 118 "c1"><tt>grow_factor</tt></span>^2, ...</p> 119 </td> 120 </tr> 121 122 <tr> 123 <td> 124 <pre> 125<b>void</b> 126 swap 127 (<span class= 128"c2"><tt>hash_exponential_size_policy</tt></span> &other) 129</pre> 130 </td> 131 132 <td> 133 <p>Swaps content.</p> 134 </td> 135 </tr> 136 </table> 137 138 <h2><a name="link6" id="link6">Protected Methods</a></h2> 139 140 <h3><a name="link7" id="link7">Size methods</a></h3> 141 142 <table class="c1" width="100%" border="1" summary="Methods"> 143 <tr> 144 <td width="45%" align="left"><b>Method</b></td> 145 146 <td width="55%" align="left"><b>Description</b></td> 147 </tr> 148 149 <tr> 150 <td> 151 <pre> 152<a href="#size_type55424436"><tt>size_type</tt></a> 153 get_nearest_larger_size 154 (<a href= 155"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b> 156</pre> 157 </td> 158 159 <td> 160 <p>Given a size <span class="c1"><tt>size</tt></span>, 161 returns a size that is larger.</p> 162 </td> 163 </tr> 164 165 <tr> 166 <td> 167 <pre> 168<a href="#size_type55424436"><tt>size_type</tt></a> 169 get_nearest_smaller_size 170 (<a href= 171"#size_type55424436"><tt>size_type</tt></a> size) <b>const</b> 172</pre> 173 </td> 174 175 <td> 176 <p>Given a size <span class="c1"><tt>size</tt></span>, 177 returns a size that is smaller.</p> 178 </td> 179 </tr> 180 </table> 181 </div> 182</body> 183</html> 184