OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libstdc++-v3/] [docs/] [html/] [ext/] [pb_assoc/] [cc_hash_max_collision_check_resize_trigger.html] - Rev 20

Compare with Previous | Blame | View Log

 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
 
<html>
<head>
<title>cc_hash_max_collision_check_resize_trigger Interface
</title>
 
</head>
 
<body>
<h1>
<tt>cc_hash_max_collision_check_resize_trigger
</tt>
 
 Interface
 
 
</h1>
 
<p>A resize trigger policy based on collision checks. It keeps the simulated load factor lower than some given load factor.
</p>
 
<ol>
<li>
<a href = "../../../../include/ext/pb_assoc/hash_policy.hpp"><tt>hash_policy.hpp</tt>
</a>
 
</li>
 
<li>
<a href = "#link1">Template parameters.
</a>
 
</li>
 
<li>
Public Types and Constants:
 
 
<ol>
<li>
<a href = "#link2">General definitions.
</a>
 
</li>
 
</ol>
 
</li>
 
<li>
Public Methods:
 
 
<ol>
<li>
<a href = "#link3">Constructors, destructor, and related.
</a>
 
</li>
 
<li>
<a href = "#link4">Load access methods.
</a>
 
</li>
 
</ol>
 
</li>
 
<li>
Protected Methods:
 
 
<ol>
<li>
<a href = "#link5">Insert search notifications.
</a>
 
</li>
 
<li>
<a href = "#link6">Find search notifications.
</a>
 
</li>
 
<li>
<a href = "#link7">Erase search notifications.
</a>
 
</li>
 
<li>
<a href = "#link8">Content change notifications.
</a>
 
</li>
 
<li>
<a href = "#link9">Size change notifications.
</a>
 
</li>
 
<li>
<a href = "#link10">Queries.
</a>
 
</li>
 
</ol>
 
</li>
 
</ol>
 
 
<h2>
<a name = "link1">Template parameters.
</a>
 
</h2>
 
<table WIDTH = "100%" BORDER = "1">
<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>
 
 
<tr>
<td>
<pre><a name = "External_Load_Access3735929540">External_Load_Access</a></pre>
 
 
</td>
 
<td>
<p>Specifies whether the load factor can be accessed externally. The two options have different tradeoffs in terms of flexibility, genericity, and encapsulation.</p>
 
 
</td>
 
<td>
<tt><b>false</b></tt>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><a name = "Size_Type3735929483">Size_Type</a></pre>
 
 
</td>
 
<td>
<p>Size type.</p>
 
 
</td>
 
<td>
size_t
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link2">General definitions.
</a>
 
</h2>
 
<table WIDTH = "100%" BORDER = "1">
<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>
 
 
<tr>
<td>
<pre><a name = "size_type3735929547">size_type</a></pre>
 
 
</td>
 
<td>
<pre><a href = "#Size_Type3735929483">Size_Type</a></pre>
 
 
</td>
 
<td>
<p>Size type.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><a name = "external_load_access3735929604">external_load_access</a></pre>
 
 
</td>
 
<td>
<pre><a href = "#External_Load_Access3735929540">External_Load_Access</a></pre>
 
 
</td>
 
<td>
<p>Indicates whether loads can be accessed externally</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link3">Constructors, destructor, and related.
</a>
 
</h2>
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre>  cc_hash_max_collision_check_resize_trigger
  (float load = 0.5)</pre>
 
 
</td>
 
<td>
<p>Default constructor, or constructor taking <font color = "#666666"><tt>load</tt></font>, a load factor which it will attempt to maintain.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>void</b>
  swap
  (<font color = "olive">cc_hash_max_collision_check_resize_trigger</font> &amp;r_other)</pre>
 
 
</td>
 
<td>
<p>Swaps content.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link4">Load access methods.
</a>
 
</h2>
 
<p> These methods are only available if the external access parameter is set.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> float
  get_load
  () <b>const</b></pre>
 
 
</td>
 
<td>
<p>Returns a pair of the minimal and maximal loads, respectively.</p>
 
 
<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>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link5">Insert search notifications.
</a>
 
</h2>
 
<p>Notifications called during an insert operation.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_insert_search_start
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search started.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_insert_search_collision
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search encountered a collision.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_insert_search_end
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search ended.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link6">Find search notifications.
</a>
 
</h2>
 
<p>Notifications called during a find operation.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_find_search_start
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search started.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_find_search_collision
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search encountered a collision.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_find_search_end
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search ended.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link7">Erase search notifications.
</a>
 
</h2>
 
<p>Notifications called during an insert operation.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_erase_search_start
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search started.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_erase_search_collision
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search encountered a collision.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_erase_search_end
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies a search ended.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link8">Content change notifications.
</a>
 
</h2>
 
<p>Notifications called when the content of the table changes in a way that can affect the resize policy.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_inserted
  (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
 
 
</td>
 
<td>
<p>Notifies an element was inserted.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>void</b>
  notify_erased
  (<a href = "#size_type3735929547">size_type</a> num_entries)</pre>
 
 
</td>
 
<td>
<p>Notifies an element was erased.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>void</b>
  notify_cleared
  ()</pre>
 
 
</td>
 
<td>
<p>Notifies the table was cleared.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link9">Size change notifications.
</a>
 
</h2>
 
<p>Notifications called when the table changes size.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>void</b>
  notify_resized
  (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
 
 
</td>
 
<td>
<p>Notifies the table was resized as a result of this object's signifying that a resize is needed.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>void</b>
  notify_externally_resized
  (<a href = "#size_type3735929547">size_type</a> new_size)</pre>
 
 
</td>
 
<td>
<p>Notifies the table was resized externally.</p>
 
 
</td>
 
</tr>
 
</table>
 
<h2>
<a name = "link10">Queries.
</a>
 
</h2>
 
<p>Called to query whether/how to resize.</p>
 
 
<table WIDTH = "100%" BORDER = "1">
<TR><TD Width = "45%" ALIGN = "left"><b>Method</b></TD><TD Width = "55%" ALIGN = "left"><b>Description</b></TD></TR>
 
 
<tr>
<td>
<pre><b>inline</b> <b>bool</b>
  is_resize_needed
  () <b>const</b></pre>
 
 
</td>
 
<td>
<p>Queries whether a resize is needed.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>bool</b>
  is_grow_needed
  (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
 
 
</td>
 
<td>
<p>Queries whether a grow is needed.</p>
 
 
<p>This method is called only if this object indicated is needed.</p>
 
 
</td>
 
</tr>
 
<tr>
<td>
<pre><b>inline</b> <b>bool</b>
  is_shrink_needed
  (<a href = "#size_type3735929547">size_type</a> size, <a href = "#size_type3735929547">size_type</a> num_entries) <b>const</b></pre>
 
 
</td>
 
<td>
<p>Queries whether a shrink is needed.</p>
 
 
<p>This method is called only if this object indicated is needed.</p>
 
 
</td>
 
</tr>
 
</table>
 
 
 
</body>
 
</html>
 
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.