Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libstdc++-v3 / docs / html / ext / pb_assoc / hash_standard_resize_policy.html
blob0735dad530410a0d6dcc4d2adfe499b72c3c0c1b
2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
5 <html>
6 <head>
7 <title>hash_standard_resize_policy Interface
8 </title>
10 </head>
12 <body>
13 <h1>
14 <tt>hash_standard_resize_policy
15 </tt>
17 Interface
20 </h1>
22 <p>A resize policy which delegates operations to size and trigger policies.
23 </p>
25 <ol>
26 <li>
27 <a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
28 </a>
30 </li>
32 <li>
33 <a href = "#link1">Template parameters.
34 </a>
36 </li>
38 <li>
39 <a href = "#link2">Base classes.
40 </a>
42 </li>
44 <li>
45 Public Types and Constants:
48 <ol>
49 <li>
50 <a href = "#link3">General definitions.
51 </a>
53 </li>
55 <li>
56 <a href = "#link4">Policy definitions.
57 </a>
59 </li>
61 </ol>
63 </li>
65 <li>
66 Public Methods:
69 <ol>
70 <li>
71 <a href = "#link5">Constructors, destructor, and related.
72 </a>
74 </li>
76 <li>
77 <a href = "#link6">Policy access methods.
78 </a>
80 </li>
82 <li>
83 <a href = "#link7">Size access methods.
84 </a>
86 </li>
88 </ol>
90 </li>
92 <li>
93 Protected Methods:
96 <ol>
97 <li>
98 <a href = "#link8">Insert search notifications.
99 </a>
101 </li>
103 <li>
104 <a href = "#link9">Find search notifications.
105 </a>
107 </li>
109 <li>
110 <a href = "#link10">Erase search notifications.
111 </a>
113 </li>
115 <li>
116 <a href = "#link11">Content change notifications.
117 </a>
119 </li>
121 <li>
122 <a href = "#link12">Size change notifications.
123 </a>
125 </li>
127 <li>
128 <a href = "#link13">Queries.
129 </a>
131 </li>
133 </ol>
135 </li>
137 </ol>
140 <h2>
141 <a name = "link1">Template parameters.
142 </a>
144 </h2>
146 <table WIDTH = "100%" BORDER = "1">
147 <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>
150 <tr>
151 <td>
152 <pre><a name = "Size_Policy3735929689">Size_Policy</a></pre>
155 </td>
157 <td>
158 <p>Size policy type.</p>
161 </td>
163 <td>
164 <a href = "hash_exponential_size_policy.html"><tt>hash_exponential_size_policy&lt;&gt;</tt></a>
167 </td>
169 </tr>
171 <tr>
172 <td>
173 <pre><a name = "Trigger_Policy3735930002">Trigger_Policy</a></pre>
176 </td>
178 <td>
179 <p>Trigger policy type.</p>
182 </td>
184 <td>
185 <a href = "ht_load_check_trigger.html"><tt>ht_load_check_trigger&lt;&gt;</tt></a>
188 </td>
190 </tr>
192 <tr>
193 <td>
194 <pre><a name = "External_Size_Access3735929535">External_Size_Access</a></pre>
197 </td>
199 <td>
200 <p>Indicates whether physical sizes can be accessed externally.</p>
203 </td>
205 <td>
206 <tt><b>false</b></tt>
209 </td>
211 </tr>
213 <tr>
214 <td>
215 <pre><a name = "Size_Type3735929483">Size_Type</a></pre>
218 </td>
220 <td>
221 <p>Size type.</p>
224 </td>
226 <td>
227 size_t
230 </td>
232 </tr>
234 </table>
236 <h2>
237 <a name = "link2">Base classes.
238 </a>
240 </h2>
242 <table WIDTH = "100%" BORDER = "1">
243 <TR><TD Width = "80%" ALIGN = "left"><b>Class</b></TD><TD Width = "20%" ALIGN = "left"><b>Derivation Type</b></TD></TR>
246 <tr>
247 <td>
248 <pre><a href = "#Size_Policy3735929689">Size_Policy</a></pre>
251 </td>
253 <td>
254 <p>public</p>
257 </td>
259 </tr>
261 <tr>
262 <td>
263 <pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a></pre>
266 </td>
268 <td>
269 <p>public</p>
272 </td>
274 </tr>
276 </table>
278 <h2>
279 <a name = "link3">General definitions.
280 </a>
282 </h2>
284 <table WIDTH = "100%" BORDER = "1">
285 <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>
288 <tr>
289 <td>
290 <pre><a name = "size_type3735929547">size_type</a></pre>
293 </td>
295 <td>
296 <pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
299 </td>
301 <td>
302 <p>Size type.</p>
305 </td>
307 </tr>
309 </table>
311 <h2>
312 <a name = "link4">Policy definitions.
313 </a>
315 </h2>
317 <table WIDTH = "100%" BORDER = "1">
318 <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>
321 <tr>
322 <td>
323 <pre><a name = "trigger_policy3735930066">trigger_policy</a></pre>
326 </td>
328 <td>
329 <pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a></pre>
332 </td>
334 <td>
335 <p>Trigger policy type.</p>
338 </td>
340 </tr>
342 <tr>
343 <td>
344 <pre><a name = "size_policy3735929753">size_policy</a></pre>
347 </td>
349 <td>
350 <pre><a href = "#Size_Policy3735929689">Size_Policy</a></pre>
353 </td>
355 <td>
356 <p>Size policy type.</p>
359 </td>
361 </tr>
363 <tr>
364 <td>
365 <pre><a name = "external_size_access3735929599">external_size_access</a></pre>
368 </td>
370 <td>
371 <pre><a href = "#External_Size_Access3735929535">External_Size_Access</a></pre>
374 </td>
376 <td>
377 <p>Indicates whether sizes can be accessed externally.</p>
380 </td>
382 </tr>
384 </table>
386 <h2>
387 <a name = "link5">Constructors, destructor, and related.
388 </a>
390 </h2>
392 <table WIDTH = "100%" BORDER = "1">
393 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
396 <tr>
397 <td>
398 <pre> hash_standard_resize_policy
399 (<a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
402 </td>
404 <td>
405 <p>Default constructor, or constructor taking <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object).</p>
408 </td>
410 </tr>
412 <tr>
413 <td>
414 <pre> hash_standard_resize_policy
415 (<b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;r_size_policy,
416 <a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
419 </td>
421 <td>
422 <p>constructor taking some policies and <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object). <font color = "#666666"><tt>r_size_policy</tt></font> will be copied by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object of this object.</p>
425 </td>
427 </tr>
429 <tr>
430 <td>
431 <pre> hash_standard_resize_policy
432 (<b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;r_size_policy,
433 <b>const</b> <a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;r_trigger_policy,
434 <a href = "#size_type3735929547">size_type</a> suggested_size = 8)</pre>
437 </td>
439 <td>
440 <p>constructor taking some policies and <font color = "#666666"><tt>suggested_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object). <font color = "#666666"><tt>r_size_policy</tt></font> will be copied by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object of this object. <font color = "#666666"><tt>r_trigger_policy</tt></font> will be copied by the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object of this object.</p>
443 </td>
445 </tr>
447 <tr>
448 <td>
449 <pre><b>virtual</b>
450 ~hash_standard_resize_policy
451 ()</pre>
454 </td>
456 <td>
457 <p>Destructor.</p>
460 </td>
462 </tr>
464 <tr>
465 <td>
466 <pre><b>inline</b> <b>void</b>
467 swap
468 (<font color = "olive">hash_standard_resize_policy</font> &amp;r_other)</pre>
471 </td>
473 <td>
474 <p>Swaps content.</p>
477 </td>
479 </tr>
481 </table>
483 <h2>
484 <a name = "link6">Policy access methods.
485 </a>
487 </h2>
489 <table WIDTH = "100%" BORDER = "1">
490 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
493 <tr>
494 <td>
495 <pre><a href = "#Size_Policy3735929689">Size_Policy</a> &amp;
496 get_size_policy
497 ()</pre>
500 </td>
502 <td>
503 <p>Access to the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object used.</p>
506 </td>
508 </tr>
510 <tr>
511 <td>
512 <pre><b>const</b> <a href = "#Size_Policy3735929689">Size_Policy</a> &amp;
513 get_size_policy
514 () <b>const</b></pre>
517 </td>
519 <td>
520 <p>Const access to the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object used.</p>
523 </td>
525 </tr>
527 <tr>
528 <td>
529 <pre><a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;
530 get_trigger_policy
531 ()</pre>
534 </td>
536 <td>
537 <p>Access to the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object used.</p>
540 </td>
542 </tr>
544 <tr>
545 <td>
546 <pre><b>const</b> <a href = "#Trigger_Policy3735930002">Trigger_Policy</a> &amp;
547 get_trigger_policy
548 () <b>const</b></pre>
551 </td>
553 <td>
554 <p>Access to the <a href = "#Trigger_Policy3735930002"><tt>Trigger_Policy</tt></a> object used.</p>
557 </td>
559 </tr>
561 </table>
563 <h2>
564 <a name = "link7">Size access methods.
565 </a>
567 </h2>
569 <p>These methods are available only if the external size parameter indicates that external size access is allowed.</p>
572 <table WIDTH = "100%" BORDER = "1">
573 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
576 <tr>
577 <td>
578 <pre><b>inline</b> <a href = "#size_type3735929547">size_type</a>
579 get_actual_size
580 () <b>const</b></pre>
583 </td>
585 <td>
586 <p>Returns the actual size of the container.</p>
589 <p>This method returns the number of entries (used and unused) in the container. It is different from the container's size method, which returns the number of used entries. Calling this method will not compile when <a href = "#External_Size_Access3735929535"><tt>External_Size_Access</tt></a> == <tt><b>false</b></tt>.</p>
592 </td>
594 </tr>
596 <tr>
597 <td>
598 <pre><b>void</b>
599 resize
600 (<a href = "#size_type3735929547">size_type</a> suggested_new_size)</pre>
603 </td>
605 <td>
606 <p>Resizes the container to <font color = "#666666"><tt>suggested_new_size</tt></font>, a suggested size (the actual size will be determined by the <a href = "#Size_Policy3735929689"><tt>Size_Policy</tt></a> object).</p>
609 <p>Calling this method will not compile when <a href = "#External_Size_Access3735929535"><tt>External_Size_Access</tt></a> == <tt><b>false</b></tt>.</p>
612 </td>
614 </tr>
616 </table>
618 <h2>
619 <a name = "link8">Insert search notifications.
620 </a>
622 </h2>
624 <p>Notifications called during an insert operation.</p>
627 <table WIDTH = "100%" BORDER = "1">
628 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
631 <tr>
632 <td>
633 <pre><b>inline</b> <b>void</b>
634 notify_insert_search_start
635 ()</pre>
638 </td>
640 <td>
641 <p>Notifies a search started.</p>
644 </td>
646 </tr>
648 <tr>
649 <td>
650 <pre><b>inline</b> <b>void</b>
651 notify_insert_search_collision
652 ()</pre>
655 </td>
657 <td>
658 <p>Notifies a search encountered a collision.</p>
661 </td>
663 </tr>
665 <tr>
666 <td>
667 <pre><b>inline</b> <b>void</b>
668 notify_insert_search_end
669 ()</pre>
672 </td>
674 <td>
675 <p>Notifies a search ended.</p>
678 </td>
680 </tr>
682 </table>
684 <h2>
685 <a name = "link9">Find search notifications.
686 </a>
688 </h2>
690 <p>Notifications called during a find operation.</p>
693 <table WIDTH = "100%" BORDER = "1">
694 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
697 <tr>
698 <td>
699 <pre><b>inline</b> <b>void</b>
700 notify_find_search_start
701 ()</pre>
704 </td>
706 <td>
707 <p>Notifies a search started.</p>
710 </td>
712 </tr>
714 <tr>
715 <td>
716 <pre><b>inline</b> <b>void</b>
717 notify_find_search_collision
718 ()</pre>
721 </td>
723 <td>
724 <p>Notifies a search encountered a collision.</p>
727 </td>
729 </tr>
731 <tr>
732 <td>
733 <pre><b>inline</b> <b>void</b>
734 notify_find_search_end
735 ()</pre>
738 </td>
740 <td>
741 <p>Notifies a search ended.</p>
744 </td>
746 </tr>
748 </table>
750 <h2>
751 <a name = "link10">Erase search notifications.
752 </a>
754 </h2>
756 <p>Notifications called during an insert operation.</p>
759 <table WIDTH = "100%" BORDER = "1">
760 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
763 <tr>
764 <td>
765 <pre><b>inline</b> <b>void</b>
766 notify_erase_search_start
767 ()</pre>
770 </td>
772 <td>
773 <p>Notifies a search started.</p>
776 </td>
778 </tr>
780 <tr>
781 <td>
782 <pre><b>inline</b> <b>void</b>
783 notify_erase_search_collision
784 ()</pre>
787 </td>
789 <td>
790 <p>Notifies a search encountered a collision.</p>
793 </td>
795 </tr>
797 <tr>
798 <td>
799 <pre><b>inline</b> <b>void</b>
800 notify_erase_search_end
801 ()</pre>
804 </td>
806 <td>
807 <p>Notifies a search ended.</p>
810 </td>
812 </tr>
814 </table>
816 <h2>
817 <a name = "link11">Content change notifications.
818 </a>
820 </h2>
822 <p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
825 <table WIDTH = "100%" BORDER = "1">
826 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
829 <tr>
830 <td>
831 <pre><b>inline</b> <b>void</b>
832 notify_inserted
833 (<a href = "#size_type3735929547">size_type</a> num_e)</pre>
836 </td>
838 <td>
839 <p>Notifies an element was inserted.</p>
842 </td>
844 </tr>
846 <tr>
847 <td>
848 <pre><b>inline</b> <b>void</b>
849 notify_erased
850 (<a href = "#size_type3735929547">size_type</a> num_e)</pre>
853 </td>
855 <td>
856 <p>Notifies an element was erased.</p>
859 </td>
861 </tr>
863 <tr>
864 <td>
865 <pre><b>void</b>
866 notify_cleared
867 ()</pre>
870 </td>
872 <td>
873 <p>Notifies the table was cleared.</p>
876 </td>
878 </tr>
880 </table>
882 <h2>
883 <a name = "link12">Size change notifications.
884 </a>
886 </h2>
888 <p>Notifications called when the table changes size.</p>
891 <table WIDTH = "100%" BORDER = "1">
892 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
895 <tr>
896 <td>
897 <pre><b>void</b>
898 notify_resized
899 (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
902 </td>
904 <td>
905 <p>Notifies the table was resized to <font color = "#666666"><tt>new_size</tt></font>.</p>
908 </td>
910 </tr>
912 </table>
914 <h2>
915 <a name = "link13">Queries.
916 </a>
918 </h2>
920 <p>Called to query whether/how to resize.</p>
923 <table WIDTH = "100%" BORDER = "1">
924 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
927 <tr>
928 <td>
929 <pre><a href = "#size_type3735929547">size_type</a>
930 get_init_size
931 () <b>const</b></pre>
934 </td>
936 <td>
937 <p>Queries initial size.</p>
940 </td>
942 </tr>
944 <tr>
945 <td>
946 <pre><b>inline</b> <b>bool</b>
947 is_resize_needed
948 () <b>const</b></pre>
951 </td>
953 <td>
954 <p>Queries whether a resize is needed.</p>
957 </td>
959 </tr>
961 <tr>
962 <td>
963 <pre><a href = "#size_type3735929547">size_type</a>
964 get_new_size
965 (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_used_e) <b>const</b></pre>
968 </td>
970 <td>
971 <p>Queries what the new <font color = "#666666"><tt>size</tt></font> should be.</p>
974 </td>
976 </tr>
978 </table>
982 </body>
984 </html>