2 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>hash_exponential_size_policy Interface
14 <tt>hash_exponential_size_policy
22 <p>A size policy whose sequence of sizes form an exponential sequence (typically powers of
2)
27 <a href =
"../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp
</tt>
33 <a href =
"#link1">Template parameters.
39 Public Types and Constants:
44 <a href =
"#link2">General definitions.
59 <a href =
"#link3">Constructors, destructors, and related methods.
74 <a href =
"#link4">Size methods
87 <a name =
"link1">Template parameters.
92 <table WIDTH =
"100%" BORDER =
"1">
93 <TR><TD Width =
"20%" ALIGN =
"left"><b>Parameter
</b></TD><TD Width =
"50%" ALIGN =
"left"><b>Description
</b></TD><TD Width =
"30%" ALIGN =
"left"><b>Default Value
</b></TD></TR>
98 <pre><a name =
"Size_Type3735929483">Size_Type
</a></pre>
120 <a name =
"link2">General definitions.
125 <table WIDTH =
"100%" BORDER =
"1">
126 <TR><TD Width =
"30%" ALIGN =
"left"><b>Type
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Definition
</b></TD><TD Width =
"15%" ALIGN =
"left"><b>Description
</b></TD></TR>
131 <pre><a name =
"size_type3735929547">size_type
</a></pre>
137 <pre><a href =
"#Size_Type3735929483">Size_Type
</a></pre>
153 <a name =
"link3">Constructors, destructors, and related methods.
158 <table WIDTH =
"100%" BORDER =
"1">
159 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
164 <pre> hash_exponential_size_policy
165 (
<a href =
"#size_type3735929547">size_type
</a> start_size =
8,
166 <a href =
"#size_type3735929547">size_type
</a> grow_factor =
2)
</pre>
172 <p>Default constructor, or onstructor taking a
<font color =
"#666666"><tt>start_size
</tt></font>, a start size and
<font color =
"#666666"><tt>grow_factor
</tt></font>, a growth factor. The policy will use the sequence of sizes
<font color =
"#666666"><tt>start_size
</tt></font>,
<font color =
"#666666"><tt>start_size
</tt></font> *
<font color =
"#666666"><tt>grow_factor
</tt></font>,
<font color =
"#666666"><tt>start_size
</tt></font> *
<font color =
"#666666"><tt>grow_factor
</tt></font>^
2, ...
</p>
183 (
<font color =
"olive">hash_exponential_size_policy
</font> &r_other)
</pre>
189 <p>Swaps content.
</p>
199 <a name =
"link4">Size methods
204 <table WIDTH =
"100%" BORDER =
"1">
205 <TR><TD Width =
"45%" ALIGN =
"left"><b>Method
</b></TD><TD Width =
"55%" ALIGN =
"left"><b>Description
</b></TD></TR>
210 <pre><a href =
"#size_type3735929547">size_type
</a>
212 (
<a href =
"#size_type3735929547">size_type
</a> suggested_size)
<b>const
</b></pre>
218 <p>Given
<font color =
"#666666"><tt>suggested_size
</tt></font>, a suggested size, returns an initial size of the container related to the initial size.
</p>
227 <pre><a href =
"#size_type3735929547">size_type
</a>
228 get_nearest_larger_size
229 (
<a href =
"#size_type3735929547">size_type
</a> cur_size)
<b>const
</b></pre>
235 <p>Given
<font color =
"#666666"><tt>cur_size
</tt></font>, the current size, returns a size that is larger.
</p>
244 <pre><a href =
"#size_type3735929547">size_type
</a>
245 get_nearest_smaller_size
246 (
<a href =
"#size_type3735929547">size_type
</a> cur_size)
<b>const
</b></pre>
252 <p>Given
<font color =
"#666666"><tt>cur_size
</tt></font>, the current size, returns a size that is smaller.
</p>