]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/libstdc++-v3/contrib/libstdc++-v3-4.3.3/doc/html/ext/pb_ds/hash_standard_resize_policy.html
update
[l4.git] / l4 / pkg / libstdc++-v3 / contrib / libstdc++-v3-4.3.3 / doc / html / ext / pb_ds / hash_standard_resize_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_standard_resize_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_standard_resize_policy</tt> Interface</h1>
17
18     <p>A resize policy which delegates operations to size and
19     trigger policies.</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">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_Policy1072992366" id=
40 "Size_Policy1072992366"><b>class</b> Size_Policy </a>
41 </pre>
42         </td>
43
44         <td>
45           <p>Size policy type.</p>
46         </td>
47
48         <td><a href=
49         "hash_exponential_size_policy.html"><span class="c2"><tt>hash_exponential_size_policy</tt></span></a></td>
50       </tr>
51
52       <tr>
53         <td>
54           <pre>
55 <a name="Trigger_Policy3611271815" id=
56 "Trigger_Policy3611271815"><b>class</b> Trigger_Policy </a>
57 </pre>
58         </td>
59
60         <td>
61           <p>Trigger policy type.</p>
62         </td>
63
64         <td><a href=
65         "hash_load_check_resize_trigger.html"><span class=
66         "c2"><tt>hash_load_check_resize_trigger</tt></span></a></td>
67       </tr>
68
69       <tr>
70         <td>
71           <pre>
72 <a name="External_Size_Access1380482982" id=
73 "External_Size_Access1380482982"><b>bool</b> External_Size_Access </a>
74 </pre>
75         </td>
76
77         <td>
78           <p>Indicates whether physical sizes can be accessed
79           externally.</p>
80         </td>
81
82         <td><tt><b>false</b></tt></td>
83       </tr>
84
85       <tr>
86         <td>
87           <pre>
88 <a name="Size_Type42920436" id=
89 "Size_Type42920436"><b>typename</b> Size_Type </a>
90 </pre>
91         </td>
92
93         <td>
94           <p>Size type.</p>
95         </td>
96
97         <td>size_t</td>
98       </tr>
99     </table>
100
101     <h2><a name="link2" id="link2">Base Classes</a></h2>
102
103     <table class="c1" width="100%" border="1" summary="Bases">
104       <tr>
105         <td width="80%" align="left"><b>Class</b></td>
106
107         <td width="20%" align="left"><b>Derivation Type</b></td>
108       </tr>
109
110       <tr>
111         <td>
112           <pre>
113 <a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
114 </pre>
115         </td>
116
117         <td>
118           <p>public</p>
119         </td>
120       </tr>
121
122       <tr>
123         <td>
124           <pre>
125 <a href="#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
126 </pre>
127         </td>
128
129         <td>
130           <p>public</p>
131         </td>
132       </tr>
133     </table>
134
135     <h2><a name="link3" id="link3">Public Types and
136     Constants</a></h2>
137
138     <h3><a name="link4" id="link4">General Definitions</a></h3>
139
140     <table class="c1" width="100%" border="1" summary="Types">
141       <tr>
142         <td width="30%" align="left"><b>Type</b></td>
143
144         <td width="55%" align="left"><b>Definition</b></td>
145
146         <td width="15%" align="left"><b>Description</b></td>
147       </tr>
148
149       <tr>
150         <td>
151           <pre>
152 <a name="size_type55424436" id="size_type55424436">size_type</a>
153 </pre>
154         </td>
155
156         <td>
157           <pre>
158 <a href="#Size_Type42920436"><tt>Size_Type</tt></a>
159 </pre>
160         </td>
161
162         <td>
163           <p>Size type.</p>
164         </td>
165       </tr>
166     </table>
167
168     <h3><a name="link5" id="link5">Policy Definitions</a></h3>
169
170     <table class="c1" width="100%" border="1" summary="Types">
171       <tr>
172         <td width="30%" align="left"><b>Type</b></td>
173
174         <td width="55%" align="left"><b>Definition</b></td>
175
176         <td width="15%" align="left"><b>Description</b></td>
177       </tr>
178
179       <tr>
180         <td>
181           <pre>
182 <a name="trigger_policy4019166151" id=
183 "trigger_policy4019166151">trigger_policy</a>
184 </pre>
185         </td>
186
187         <td>
188           <pre>
189 <a href="#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
190 </pre>
191         </td>
192
193         <td>
194           <p>Trigger policy type.</p>
195         </td>
196       </tr>
197
198       <tr>
199         <td>
200           <pre>
201 <a name="size_policy1385592366" id=
202 "size_policy1385592366">size_policy</a>
203 </pre>
204         </td>
205
206         <td>
207           <pre>
208 <a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
209 </pre>
210         </td>
211
212         <td>
213           <p>Size policy type.</p>
214         </td>
215       </tr>
216
217       <tr>
218         <td>
219           <pre>
220 <a name="external_size_access4043083014" id=
221 "external_size_access4043083014">external_size_access</a>
222 </pre>
223         </td>
224
225         <td>
226           <pre>
227 <a href=
228 "#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
229 </pre>
230         </td>
231
232         <td>
233           <p>Indicates whether sizes can be accessed
234           externally.</p>
235         </td>
236       </tr>
237     </table>
238
239     <h2><a name="link6" id="link6">Public Methods</a></h2>
240
241     <h3><a name="link7" id="link7">Constructors, Destructor, and
242     Related</a></h3>
243
244     <table class="c1" width="100%" border="1" summary="Methods">
245       <tr>
246         <td width="45%" align="left"><b>Method</b></td>
247
248         <td width="55%" align="left"><b>Description</b></td>
249       </tr>
250
251       <tr>
252         <td>
253           <pre>
254   hash_standard_resize_policy
255   ()
256 </pre>
257         </td>
258
259         <td>
260           <p>Default constructor.</p>
261         </td>
262       </tr>
263
264       <tr>
265         <td>
266           <pre>
267   hash_standard_resize_policy
268   (<b>const</b> <a href=
269 "#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;r_size_policy)
270 </pre>
271         </td>
272
273         <td>
274           <p>constructor taking some policies <span class=
275           "c1"><tt>r_size_policy</tt></span> will be copied by the
276           <a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
277           object of this object.</p>
278         </td>
279       </tr>
280
281       <tr>
282         <td>
283           <pre>
284   hash_standard_resize_policy
285   (<b>const</b> <a href=
286 "#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;r_size_policy,
287     <b>const</b> <a href=
288 "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;r_trigger_policy)
289 </pre>
290         </td>
291
292         <td>
293           <p>constructor taking some policies. <span class=
294           "c1"><tt>r_size_policy</tt></span> will be copied by the
295           <a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a>
296           object of this object. <span class=
297           "c1"><tt>r_trigger_policy</tt></span> will be copied by
298           the <a href=
299           "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
300           object of this object.</p>
301         </td>
302       </tr>
303
304       <tr>
305         <td>
306           <pre>
307 <b>virtual</b> 
308   ~hash_standard_resize_policy
309   ()
310 </pre>
311         </td>
312
313         <td>
314           <p>Destructor.</p>
315         </td>
316       </tr>
317
318       <tr>
319         <td>
320           <pre>
321 <b>inline</b> <b>void</b> 
322   swap
323   (<span class=
324 "c2"><tt>hash_standard_resize_policy</tt></span> &amp;other)
325 </pre>
326         </td>
327
328         <td>
329           <p>Swaps content.</p>
330         </td>
331       </tr>
332     </table>
333
334     <h3><a name="link8" id="link8">Policy Access Methods</a></h3>
335
336     <table class="c1" width="100%" border="1" summary="Methods">
337       <tr>
338         <td width="45%" align="left"><b>Method</b></td>
339
340         <td width="55%" align="left"><b>Description</b></td>
341       </tr>
342
343       <tr>
344         <td>
345           <pre>
346 <a href="#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;
347   get_size_policy
348   ()
349 </pre>
350         </td>
351
352         <td>
353           <p>Access to the <a href=
354           "#Size_Policy1072992366"><tt>Size_Policy</tt></a> object
355           used.</p>
356         </td>
357       </tr>
358
359       <tr>
360         <td>
361           <pre>
362 <b>const</b> <a href=
363 "#Size_Policy1072992366"><tt>Size_Policy</tt></a> &amp;
364   get_size_policy
365   () <b>const</b>
366 </pre>
367         </td>
368
369         <td>
370           <p>Const access to the <a href=
371           "#Size_Policy1072992366"><tt>Size_Policy</tt></a> object
372           used.</p>
373         </td>
374       </tr>
375
376       <tr>
377         <td>
378           <pre>
379 <a href=
380 "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;
381   get_trigger_policy
382   ()
383 </pre>
384         </td>
385
386         <td>
387           <p>Access to the <a href=
388           "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
389           object used.</p>
390         </td>
391       </tr>
392
393       <tr>
394         <td>
395           <pre>
396 <b>const</b> <a href=
397 "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a> &amp;
398   get_trigger_policy
399   () <b>const</b>
400 </pre>
401         </td>
402
403         <td>
404           <p>Access to the <a href=
405           "#Trigger_Policy3611271815"><tt>Trigger_Policy</tt></a>
406           object used.</p>
407         </td>
408       </tr>
409     </table>
410
411     <h3><a name="link9" id="link9">Size Access Methods</a></h3>
412
413     <p>These methods are available only if the external size
414     parameter indicates that external size access is allowed.</p>
415
416     <table class="c1" width="100%" border="1" summary="Methods">
417       <tr>
418         <td width="45%" align="left"><b>Method</b></td>
419
420         <td width="55%" align="left"><b>Description</b></td>
421       </tr>
422
423       <tr>
424         <td>
425           <pre>
426 <b>inline</b> <a href="#size_type55424436"><tt>size_type</tt></a> 
427   get_actual_size
428   () <b>const</b>
429 </pre>
430         </td>
431
432         <td>
433           <p>Returns the actual size of the container.</p>
434
435           <p>This method returns the number of entries (used and
436           unused) in the container. It is different from the
437           container's size method, which returns the number of used
438           entries. Calling this method will not compile when
439           <a href=
440           "#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
441           == <tt><b>false</b></tt>.</p>
442         </td>
443       </tr>
444
445       <tr>
446         <td>
447           <pre>
448 <b>void</b> 
449   resize
450   (<a href=
451 "#size_type55424436"><tt>size_type</tt></a> suggested_new_size)
452 </pre>
453         </td>
454
455         <td>
456           <p>Resizes the container to <span class=
457           "c1"><tt>suggested_new_size</tt></span>, a suggested size
458           (the actual size will be determined by the <a href=
459           "#Size_Policy1072992366"><tt>Size_Policy</tt></a>
460           object).</p>
461
462           <p>Calling this method will not compile when <a href=
463           "#External_Size_Access1380482982"><tt>External_Size_Access</tt></a>
464           == <tt><b>false</b></tt>.</p>
465         </td>
466       </tr>
467     </table>
468
469     <h2><a name="link10" id="link10">Protected Methods</a></h2>
470
471     <h3><a name="link11" id="link11">Insert Search
472     Notifications.</a></h3>
473
474     <p>Notifications called during an insert operation.</p>
475
476     <table class="c1" width="100%" border="1" summary="Methods">
477       <tr>
478         <td width="45%" align="left"><b>Method</b></td>
479
480         <td width="55%" align="left"><b>Description</b></td>
481       </tr>
482
483       <tr>
484         <td>
485           <pre>
486 <b>inline</b> <b>void</b>
487   notify_insert_search_start
488   ()
489 </pre>
490         </td>
491
492         <td>
493           <p>Notifies a search started.</p>
494         </td>
495       </tr>
496
497       <tr>
498         <td>
499           <pre>
500 <b>inline</b> <b>void</b>
501   notify_insert_search_collision
502   ()
503 </pre>
504         </td>
505
506         <td>
507           <p>Notifies a search encountered a collision.</p>
508         </td>
509       </tr>
510
511       <tr>
512         <td>
513           <pre>
514 <b>inline</b> <b>void</b>
515   notify_insert_search_end
516   ()
517 </pre>
518         </td>
519
520         <td>
521           <p>Notifies a search ended.</p>
522         </td>
523       </tr>
524     </table>
525
526     <h3><a name="link12" id="link12">Find Search
527     Notifications.</a></h3>
528
529     <p>Notifications called during a find operation.</p>
530
531     <table class="c1" width="100%" border="1" summary="Methods">
532       <tr>
533         <td width="45%" align="left"><b>Method</b></td>
534
535         <td width="55%" align="left"><b>Description</b></td>
536       </tr>
537
538       <tr>
539         <td>
540           <pre>
541 <b>inline</b> <b>void</b>
542   notify_find_search_start
543   ()
544 </pre>
545         </td>
546
547         <td>
548           <p>Notifies a search started.</p>
549         </td>
550       </tr>
551
552       <tr>
553         <td>
554           <pre>
555 <b>inline</b> <b>void</b>
556   notify_find_search_collision
557   ()
558 </pre>
559         </td>
560
561         <td>
562           <p>Notifies a search encountered a collision.</p>
563         </td>
564       </tr>
565
566       <tr>
567         <td>
568           <pre>
569 <b>inline</b> <b>void</b>
570   notify_find_search_end
571   ()
572 </pre>
573         </td>
574
575         <td>
576           <p>Notifies a search ended.</p>
577         </td>
578       </tr>
579     </table>
580
581     <h3><a name="link13" id="link13">Erase Search
582     Notifications.</a></h3>
583
584     <p>Notifications called during an insert operation.</p>
585
586     <table class="c1" width="100%" border="1" summary="Methods">
587       <tr>
588         <td width="45%" align="left"><b>Method</b></td>
589
590         <td width="55%" align="left"><b>Description</b></td>
591       </tr>
592
593       <tr>
594         <td>
595           <pre>
596 <b>inline</b> <b>void</b>
597   notify_erase_search_start
598   ()
599 </pre>
600         </td>
601
602         <td>
603           <p>Notifies a search started.</p>
604         </td>
605       </tr>
606
607       <tr>
608         <td>
609           <pre>
610 <b>inline</b> <b>void</b>
611   notify_erase_search_collision
612   ()
613 </pre>
614         </td>
615
616         <td>
617           <p>Notifies a search encountered a collision.</p>
618         </td>
619       </tr>
620
621       <tr>
622         <td>
623           <pre>
624 <b>inline</b> <b>void</b>
625   notify_erase_search_end
626   ()
627 </pre>
628         </td>
629
630         <td>
631           <p>Notifies a search ended.</p>
632         </td>
633       </tr>
634     </table>
635
636     <h3><a name="link14" id="link14">Content Change
637     Notifications</a></h3>
638
639     <p>Notifications called when the content of the table changes
640     in a way that can affect the resize policy.</p>
641
642     <table class="c1" width="100%" border="1" summary="Methods">
643       <tr>
644         <td width="45%" align="left"><b>Method</b></td>
645
646         <td width="55%" align="left"><b>Description</b></td>
647       </tr>
648
649       <tr>
650         <td>
651           <pre>
652 <b>inline</b> <b>void</b>
653   notify_inserted
654   (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
655 </pre>
656         </td>
657
658         <td>
659           <p>Notifies an element was inserted.</p>
660         </td>
661       </tr>
662
663       <tr>
664         <td>
665           <pre>
666 <b>inline</b> <b>void</b>
667   notify_erased
668   (<a href="#size_type55424436"><tt>size_type</tt></a> num_e)
669 </pre>
670         </td>
671
672         <td>
673           <p>Notifies an element was erased.</p>
674         </td>
675       </tr>
676
677       <tr>
678         <td>
679           <pre>
680 <b>void</b> 
681   notify_cleared
682   ()
683 </pre>
684         </td>
685
686         <td>
687           <p>Notifies the table was cleared.</p>
688         </td>
689       </tr>
690     </table>
691
692     <h3><a name="link15" id="link15">Size Change
693     Notifications</a></h3>
694
695     <p>Notifications called when the table changes size.</p>
696
697     <table class="c1" width="100%" border="1" summary="Methods">
698       <tr>
699         <td width="45%" align="left"><b>Method</b></td>
700
701         <td width="55%" align="left"><b>Description</b></td>
702       </tr>
703
704       <tr>
705         <td>
706           <pre>
707 <b>void</b>
708   notify_resized
709   (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
710 </pre>
711         </td>
712
713         <td>
714           <p>Notifies the table was resized to <span class=
715           "c1"><tt>new_size</tt></span>.</p>
716         </td>
717       </tr>
718     </table>
719
720     <h3><a name="link16" id="link16">Queries</a></h3>
721
722     <p>Called to query whether/how to resize.</p>
723
724     <table class="c1" width="100%" border="1" summary="Methods">
725       <tr>
726         <td width="45%" align="left"><b>Method</b></td>
727
728         <td width="55%" align="left"><b>Description</b></td>
729       </tr>
730
731       <tr>
732         <td>
733           <pre>
734 <b>inline</b> <b>bool</b>
735   is_resize_needed
736   () <b>const</b>
737 </pre>
738         </td>
739
740         <td>
741           <p>Queries whether a resize is needed.</p>
742         </td>
743       </tr>
744
745       <tr>
746         <td>
747           <pre>
748 <a href="#size_type55424436"><tt>size_type</tt></a>
749   get_new_size
750   (<a href="#size_type55424436"><tt>size_type</tt></a> size, 
751     <a href=
752 "#size_type55424436"><tt>size_type</tt></a> num_used_e) <b>const</b>
753 </pre>
754         </td>
755
756         <td>
757           <p>Queries what the new <span class=
758           "c1"><tt>size</tt></span> should be, when the container
759           is resized naturally. The current size of the container
760           is <span class="c1"><tt>size</tt></span>, and the number
761           of used entries within the container is <span class=
762           "c1"><tt>num_used_e</tt></span>.</p>
763         </td>
764       </tr>
765     </table>
766
767     <h2><a name="link17" id="link17">Private Methods</a></h2>
768
769     <h3><a name="link18" id="link18">Overrides</a></h3>
770
771     <table class="c1" width="100%" border="1" summary="Methods">
772       <tr>
773         <td width="45%" align="left"><b>Method</b></td>
774
775         <td width="55%" align="left"><b>Description</b></td>
776       </tr>
777
778       <tr>
779         <td>
780           <pre>
781 <b>virtual</b> <b>void</b>
782   do_resize
783   (<a href="#size_type55424436"><tt>size_type</tt></a> new_size)
784 </pre>
785         </td>
786
787         <td>
788           <p>Resizes to <span class=
789           "c1"><tt>new_size</tt></span>.</p>
790         </td>
791       </tr>
792     </table>
793   </div>
794 </body>
795 </html>