1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6 <meta name="generator" content=
7 "HTML Tidy for Linux/x86 (vers 12 April 2005), see www.w3.org" />
9 <title>sample_resize_policy Interface</title>
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
16 <h1><tt>sample_resize_policy</tt> Interface</h1>
18 <p>A sample resize policy.</p>
20 <p>This class serves to show the interface a resize policy
23 <p>Defined in: <a href=
24 "../../../../include/ext/pb_ds/detail/resize_policy/sample_resize_policy.hpp"><tt>sample_resize_policy.hpp</tt></a></p>
26 <h2><a name="link1" id="link1">Public Types and
29 <h3><a name="link2" id="link2">General definitions.</a></h3>
31 <table class="c1" width="100%" border="1" summary="Types">
33 <td width="30%" align="left"><b>Type</b></td>
35 <td width="55%" align="left"><b>Definition</b></td>
37 <td width="15%" align="left"><b>Description</b></td>
43 <a name="size_type55424436" id="size_type55424436">size_type</a>
59 <h2><a name="link3" id="link3">Public Methods</a></h2>
61 <h3><a name="link4" id="link4">Constructors, destructor, and
64 <table class="c1" width="100%" border="1" summary="Methods">
66 <td width="45%" align="left"><b>Method</b></td>
68 <td width="55%" align="left"><b>Description</b></td>
80 <p>Default constructor.</p>
82 <p>Must be default constructable.</p>
90 (<b>const</b> sample_resize_policy &other)
95 <p>Copy constructor.</p>
97 <p>Must be copy constructable.</p>
104 <b>inline</b> <b>void</b>
106 (sample_resize_policy &other)
111 <p>Swaps content.</p>
113 <p>Must be swappable (if there is such a word).</p>
118 <h2><a name="link5" id="link5">Protected Methods</a></h2>
120 <h3><a name="link6" id="link6">Insert search
121 notifications.</a></h3>
123 <p>Notifications called during an insert operation.</p>
125 <table class="c1" width="100%" border="1" summary="Methods">
127 <td width="45%" align="left"><b>Method</b></td>
129 <td width="55%" align="left"><b>Description</b></td>
135 <b>inline</b> <b>void</b>
136 notify_insert_search_start
142 <p>Notifies a search started.</p>
149 <b>inline</b> <b>void</b>
150 notify_insert_search_collision
156 <p>Notifies a search encountered a collision.</p>
163 <b>inline</b> <b>void</b>
164 notify_insert_search_end
170 <p>Notifies a search ended.</p>
175 <h3><a name="link7" id="link7">Find search
176 notifications.</a></h3>
178 <p>Notifications called during a find operation.</p>
180 <table class="c1" width="100%" border="1" summary="Methods">
182 <td width="45%" align="left"><b>Method</b></td>
184 <td width="55%" align="left"><b>Description</b></td>
190 <b>inline</b> <b>void</b>
191 notify_find_search_start
197 <p>Notifies a search started.</p>
204 <b>inline</b> <b>void</b>
205 notify_find_search_collision
211 <p>Notifies a search encountered a collision.</p>
218 <b>inline</b> <b>void</b>
219 notify_find_search_end
225 <p>Notifies a search ended.</p>
230 <h3><a name="link8" id="link8">Erase search
231 notifications.</a></h3>
233 <p>Notifications called during an insert operation.</p>
235 <table class="c1" width="100%" border="1" summary="Methods">
237 <td width="45%" align="left"><b>Method</b></td>
239 <td width="55%" align="left"><b>Description</b></td>
245 <b>inline</b> <b>void</b>
246 notify_erase_search_start
252 <p>Notifies a search started.</p>
259 <b>inline</b> <b>void</b>
260 notify_erase_search_collision
266 <p>Notifies a search encountered a collision.</p>
273 <b>inline</b> <b>void</b>
274 notify_erase_search_end
280 <p>Notifies a search ended.</p>
285 <h3><a name="link9" id="link9">Content change
286 notifications.</a></h3>
288 <p>Notifications called when the content of the table changes
289 in a way that can affect the resize policy.</p>
291 <table class="c1" width="100%" border="1" summary="Methods">
293 <td width="45%" align="left"><b>Method</b></td>
295 <td width="55%" align="left"><b>Description</b></td>
301 <b>inline</b> <b>void</b>
303 (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
308 <p>Notifies an element was inserted.</p>
315 <b>inline</b> <b>void</b>
317 (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
322 <p>Notifies an element was erased.</p>
336 <p>Notifies the table was cleared.</p>
341 <h3><a name="link10" id="link10">Size change
342 notifications.</a></h3>
344 <p>Notifications called when the table changes size.</p>
346 <table class="c1" width="100%" border="1" summary="Methods">
348 <td width="45%" align="left"><b>Method</b></td>
350 <td width="55%" align="left"><b>Description</b></td>
358 (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
363 <p>Notifies the table was resized to <span class=
364 "c1"><tt>new_size</tt></span>.</p>
369 <h3><a name="link11" id="link11">Queries.</a></h3>
371 <p>Called to query whether/how to resize.</p>
373 <table class="c1" width="100%" border="1" summary="Methods">
375 <td width="45%" align="left"><b>Method</b></td>
377 <td width="55%" align="left"><b>Description</b></td>
383 <b>inline</b> <b>bool</b>
390 <p>Queries whether a resize is needed.</p>
397 <a href="#size_type55424436"><tt>size_type</tt></a>
399 (<a href="#size_type55424436"><tt>size_type</tt></a> size,
401 "#size_type55424436"><tt>size_type</tt></a> num_used_e) <b>const</b>
406 <p>Queries what the new <span class=
407 "c1"><tt>size</tt></span> should be.</p>