2 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
7 <title>cc_hash_max_collision_check_resize_trigger Interface
14 <tt>cc_hash_max_collision_check_resize_trigger
22 <p>A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor.
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, destructor, and related.
65 <a href = "#link4">Load access methods.
80 <a href = "#link5">Insert search notifications.
86 <a href = "#link6">Find search notifications.
92 <a href = "#link7">Erase search notifications.
98 <a href = "#link8">Content change notifications.
104 <a href = "#link9">Size change notifications.
110 <a href = "#link10">Queries.
123 <a name = "link1">Template parameters.
128 <table WIDTH = "100%" BORDER = "1">
129 <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>
134 <pre><a name = "External_Load_Access3735929540">External_Load_Access</a></pre>
140 <p>Specifies whether the load factor can be accessed externally. The two options have different tradeoffs in terms of flexibility, genericity, and encapsulation.</p>
146 <tt><b>false</b></tt>
155 <pre><a name = "Size_Type3735929483">Size_Type</a></pre>
177 <a name = "link2">General definitions.
182 <table WIDTH = "100%" BORDER = "1">
183 <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>
188 <pre><a name = "size_type3735929547">size_type</a></pre>
194 <pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
209 <pre><a name = "external_load_access3735929604">external_load_access</a></pre>
215 <pre><a href = "#External_Load_Access3735929540">External_Load_Access</a></pre>
221 <p>Indicates whether loads can be accessed externally</p>
231 <a name = "link3">Constructors, destructor, and related.
236 <table WIDTH = "100%" BORDER = "1">
237 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
242 <pre> cc_hash_max_collision_check_resize_trigger
243 (float load = 0.5)</pre>
249 <p>Default constructor, or constructor taking <font color = "#666666"><tt>load</tt></font>, a load factor which it will attempt to maintain.</p>
260 (<font color = "olive">cc_hash_max_collision_check_resize_trigger</font> &r_other)</pre>
266 <p>Swaps content.</p>
276 <a name = "link4">Load access methods.
281 <p> These methods are only available if the external access parameter is set.</p>
284 <table WIDTH = "100%" BORDER = "1">
285 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
290 <pre><b>inline</b> float
292 () <b>const</b></pre>
298 <p>Returns a pair of the minimal and maximal loads, respectively.</p>
301 <p>Calling this method will not compile when <a href = "#External_Load_Access3735929540"><tt>External_Load_Access</tt></a> == <tt><b>false</b></tt>.</p>
311 <a name = "link5">Insert search notifications.
316 <p>Notifications called during an insert operation.</p>
319 <table WIDTH = "100%" BORDER = "1">
320 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
325 <pre><b>inline</b> <b>void</b>
326 notify_insert_search_start
333 <p>Notifies a search started.</p>
342 <pre><b>inline</b> <b>void</b>
343 notify_insert_search_collision
350 <p>Notifies a search encountered a collision.</p>
359 <pre><b>inline</b> <b>void</b>
360 notify_insert_search_end
367 <p>Notifies a search ended.</p>
377 <a name = "link6">Find search notifications.
382 <p>Notifications called during a find operation.</p>
385 <table WIDTH = "100%" BORDER = "1">
386 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
391 <pre><b>inline</b> <b>void</b>
392 notify_find_search_start
399 <p>Notifies a search started.</p>
408 <pre><b>inline</b> <b>void</b>
409 notify_find_search_collision
416 <p>Notifies a search encountered a collision.</p>
425 <pre><b>inline</b> <b>void</b>
426 notify_find_search_end
433 <p>Notifies a search ended.</p>
443 <a name = "link7">Erase search notifications.
448 <p>Notifications called during an insert operation.</p>
451 <table WIDTH = "100%" BORDER = "1">
452 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
457 <pre><b>inline</b> <b>void</b>
458 notify_erase_search_start
465 <p>Notifies a search started.</p>
474 <pre><b>inline</b> <b>void</b>
475 notify_erase_search_collision
482 <p>Notifies a search encountered a collision.</p>
491 <pre><b>inline</b> <b>void</b>
492 notify_erase_search_end
499 <p>Notifies a search ended.</p>
509 <a name = "link8">Content change notifications.
514 <p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
517 <table WIDTH = "100%" BORDER = "1">
518 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
523 <pre><b>inline</b> <b>void</b>
525 (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
531 <p>Notifies an element was inserted.</p>
540 <pre><b>inline</b> <b>void</b>
542 (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
548 <p>Notifies an element was erased.</p>
565 <p>Notifies the table was cleared.</p>
575 <a name = "link9">Size change notifications.
580 <p>Notifications called when the table changes size.</p>
583 <table WIDTH = "100%" BORDER = "1">
584 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
591 (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
597 <p>Notifies the table was resized as a result of this object's signifying that a resize is needed.</p>
607 notify_externally_resized
608 (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
614 <p>Notifies the table was resized externally.</p>
624 <a name = "link10">Queries.
629 <p>Called to query whether/how to resize.</p>
632 <table WIDTH = "100%" BORDER = "1">
633 <TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
638 <pre><b>inline</b> <b>bool</b>
640 () <b>const</b></pre>
646 <p>Queries whether a resize is needed.</p>
655 <pre><b>inline</b> <b>bool</b>
657 (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
663 <p>Queries whether a grow is needed.</p>
666 <p>This method is called only if this object indicated is needed.</p>
675 <pre><b>inline</b> <b>bool</b>
677 (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
683 <p>Queries whether a shrink is needed.</p>
686 <p>This method is called only if this object indicated is needed.</p>