OSDN Git Service

2008-01-18 Benjamin Kosnik <bkoz@redhat.com>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / doc / html / ext / pb_ds / hash_prime_size_policy.html
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_prime_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_prime_size_policy</tt> Interface</h1>
17
18     <p>A size policy whose sequence of sizes form a
19     nearly-exponential sequence of primes.</p>
20
21     <p>Defined in: <a href=
22     "../../../../include/ext/pb_ds/hash_policy.hpp"><tt>hash_policy.hpp</tt></a></p>
23
24     <h2><a name="link1" id="link1">Public Types and
25     Constants</a></h2>
26
27     <h3><a name="link2" id="link2">General Definitions</a></h3>
28
29     <table class="c1" width="100%" border="1" summary="Types">
30       <tr>
31         <td width="30%" align="left"><b>Type</b></td>
32
33         <td width="55%" align="left"><b>Definition</b></td>
34
35         <td width="15%" align="left"><b>Description</b></td>
36       </tr>
37
38       <tr>
39         <td>
40           <pre>
41 <a name="size_type55424436" id="size_type55424436">size_type</a>
42 </pre>
43         </td>
44
45         <td>
46           <pre>
47 size_t
48 </pre>
49         </td>
50
51         <td>
52           <p>Size type.</p>
53         </td>
54       </tr>
55     </table>
56
57     <h2><a name="link3" id="link3">Public Methods</a></h2>
58
59     <h3><a name="link4" id="link4">Constructors, Destructor, and
60     Related</a></h3>
61
62     <table class="c1" width="100%" border="1" summary="Methods">
63       <tr>
64         <td width="45%" align="left"><b>Method</b></td>
65
66         <td width="55%" align="left"><b>Description</b></td>
67       </tr>
68
69       <tr>
70         <td>
71           <pre>
72   hash_prime_size_policy
73   (<a href=
74 "#size_type55424436"><tt>size_type</tt></a> start_size = 8)
75 </pre>
76         </td>
77
78         <td>
79           <p>Default constructor, or constructor taking a
80           <span class="c1"><tt>start_size</tt></span> The policy
81           will use the sequence of sizes approximately <span class=
82           "c1"><tt>start_size</tt></span>, <span class=
83           "c1"><tt>start_size</tt></span> * 2, <span class=
84           "c1"><tt>start_size</tt></span> * 2^2, ...</p>
85         </td>
86       </tr>
87
88       <tr>
89         <td>
90           <pre>
91 <b>inline</b> <b>void</b>
92   swap
93   (<span class=
94 "c2"><tt>hash_prime_size_policy</tt></span> &amp;other)
95 </pre>
96         </td>
97
98         <td>
99           <p>Swaps content.</p>
100         </td>
101       </tr>
102     </table>
103
104     <h2><a name="link5" id="link5">Protected Methods</a></h2>
105
106     <h3><a name="link6" id="link6">Size methods</a></h3>
107
108     <table class="c1" width="100%" border="1" summary="Methods">
109       <tr>
110         <td width="45%" align="left"><b>Method</b></td>
111
112         <td width="55%" align="left"><b>Description</b></td>
113       </tr>
114
115       <tr>
116         <td>
117           <pre>
118 <a href="#size_type55424436"><tt>size_type</tt></a>
119   get_nearest_larger_size
120   (<a href=
121 "#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
122 </pre>
123         </td>
124
125         <td>
126           <p>Given a size <span class="c1"><tt>size</tt></span>,
127           returns a size that is larger.</p>
128         </td>
129       </tr>
130
131       <tr>
132         <td>
133           <pre>
134 <a href="#size_type55424436"><tt>size_type</tt></a>
135   get_nearest_smaller_size
136   (<a href=
137 "#size_type55424436"><tt>size_type</tt></a> size) <b>const</b>
138 </pre>
139         </td>
140
141         <td>
142           <p>Given a size <span class="c1"><tt>size</tt></span>,
143           returns a size that is smaller.</p>
144         </td>
145       </tr>
146     </table>
147   </div>
148 </body>
149 </html>