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>gp_hash_table Interface</title>
10 <meta http-equiv="Content-Type" content=
11 "text/html; charset=us-ascii" />
16 <h1><tt>gp_hash_table</tt> Interface</h1>
18 <p>A concrete general-probing hash-based associative
21 <p>Defined in: <a href=
22 "../../../../include/ext/pb_ds/assoc_container.hpp"><tt>assoc_container.hpp</tt></a></p>
24 <h2><a name="link1" id="link1">Template Parameters</a></h2>
26 <table class="c1" width="100%" border="1" summary=
27 "Template Parameters">
29 <td width="20%" align="left"><b>Parameter</b></td>
31 <td width="50%" align="left"><b>Description</b></td>
33 <td width="30%" align="left"><b>Default Value</b></td>
39 <a name="Key2501" id="Key2501"><b>typename</b> Key</a>
53 <a name="Mapped318655" id="Mapped318655"><b>typename</b> Mapped</a>
67 <a name="Hash_Fn1515835" id=
68 "Hash_Fn1515835"><b>class</b> Hash_Fn </a>
78 __gnu_cxx::hash<<a href="#Key2501"><tt>Key</tt></a>>
81 stdext::hash_value<<a href="#Key2501"><tt>Key</tt></a>>
82 </pre>if using Visual C++ .net
89 <a name="Eq_Fn60085" id="Eq_Fn60085"><b>class</b> Eq_Fn </a>
94 <p>Equivalence functor.</p>
99 std::equal_to<<a href="#Key2501"><tt>Key</tt></a>>
107 <a name="Comb_Probe_Fn1603930855" id=
108 "Comb_Probe_Fn1603930855"><b>class</b> Comb_Probe_Fn </a>
113 <p>Combining probe functor.</p>
115 <p>If <a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a> is
116 <a href="null_hash_fn.html"><span class=
117 "c2"><tt>null_hash_fn</tt></span></a>, and <a href=
118 "#Probe_Fn8454835"><tt>Probe_Fn</tt></a> is <a href=
119 "null_probe_fn.html"><span class=
120 "c2"><tt>null_probe_fn</tt></span></a>, then this is the
121 ranged-probe functor; otherwise, this is the
122 range-hashing functor.</p>
125 "hash_based_containers.html#hash_policies">Design::Hash-Based
126 Containers::Hash Policies</a>.)</p>
129 <td><a href="direct_mask_range_hashing.html"><span class=
130 "c2"><tt>direct_mask_range_hashing</tt></span></a></td>
136 <a name="Probe_Fn8454835" id=
137 "Probe_Fn8454835"><b>class</b> Probe_Fn </a>
142 <p>Probe functor.</p>
147 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a></tt>
148 is <a href="direct_mask_range_hashing.html"><span class=
149 "c2"><tt>direct_mask_range_hashing</tt></span></a>, then
151 <a href="linear_probe_fn.html"><span class=
152 "c2"><tt>linear_probe_fn</tt></span></a><
153 <b>typename</b> <a href=
154 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>
157 <a href="quadratic_probe_fn.html"><span class=
158 "c2"><tt>quadratic_probe_fn</tt></span></a><
159 <b>typename</b> <a href=
160 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>
168 <a name="Resize_Policy566860465" id=
169 "Resize_Policy566860465"><b>class</b> Resize_Policy </a>
174 <p>Resize policy.</p>
179 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a></tt>
181 "direct_mask_range_hashing.html"><span class=
182 "c2"><tt>direct_mask_range_hashing</tt></span></a></tt>,
185 <a href="hash_standard_resize_policy.html"><span class=
186 "c2"><tt>hash_standard_resize_policy</tt></span></a><
187 <a href="hash_exponential_size_policy.html"><span class=
188 "c2"><tt>hash_exponential_size_policy</tt></span></a><
189 <b>typename</b> <a href=
190 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>,
191 <a href="hash_load_check_resize_trigger.html"><span class=
192 "c2"><tt>hash_load_check_resize_trigger</tt></span></a><
193 <b>typename</b> <a href=
194 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>,
196 <b>typename</b> <a href=
197 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>
200 <a href="hash_standard_resize_policy.html"><span class=
201 "c2"><tt>hash_standard_resize_policy</tt></span></a><
202 <a href="hash_exponential_size_policy.html"><span class=
203 "c2"><tt>hash_exponential_size_policy</tt></span></a><
204 <b>typename</b> <a href=
205 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>,
206 <a href="hash_load_check_resize_trigger.html"><span class=
207 "c2"><tt>hash_load_check_resize_trigger</tt></span></a><
208 <b>typename</b> <a href=
209 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>,
211 <b>typename</b> <a href=
212 "#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>::size_type>
220 <a name="Store_Hash218262104" id=
221 "Store_Hash218262104"><b>bool</b> Store_Hash </a>
226 <p>Indicates whether the hash value will be stored along
230 "#hash_fn2015995"><tt>hash_fn</tt></a></tt> is <a href=
231 "null_hash_fn.html"><span class=
232 "c2"><tt>null_hash_fn</tt></span></a>, then the container
233 will not compile if this value is
234 <tt><b>true</b></tt></p>
239 <tt><b>false</b></tt>
247 <a name="Allocator35940069" id=
248 "Allocator35940069"><b>class</b> Allocator </a>
253 <p>Allocator type.</p>
258 std::allocator<<b>char</b>>
264 <h2><a name="link2" id="link2">Base Classes</a></h2>
266 <table class="c1" width="100%" border="1" summary="Bases">
268 <td width="80%" align="left"><b>Class</b></td>
270 <td width="20%" align="left"><b>Derivation Type</b></td>
276 <a href="basic_hash_table.html"><span class=
277 "c2"><tt>basic_hash_table</tt></span></a>
287 <h2><a name="link3" id="link3">Public Types and
290 <h3><a name="link4" id="link4">Policy Definitions</a></h3>
292 <table class="c1" width="100%" border="1" summary="Types">
294 <td width="30%" align="left"><b>Type</b></td>
296 <td width="55%" align="left"><b>Definition</b></td>
298 <td width="15%" align="left"><b>Description</b></td>
304 <a name="hash_fn2015995" id="hash_fn2015995">hash_fn</a>
310 <a href="#Hash_Fn1515835"><tt>Hash_Fn</tt></a>
315 <p>Hash functor type.</p>
322 <a name="eq_fn80245" id="eq_fn80245">eq_fn</a>
328 <a href="#Eq_Fn60085"><tt>Eq_Fn</tt></a>
333 <p>Equivalence functor type.</p>
340 <a name="comb_probe_fn828996423" id=
341 "comb_probe_fn828996423">comb_probe_fn</a>
347 <a href="#Comb_Probe_Fn1603930855"><tt>Comb_Probe_Fn</tt></a>
352 <p>Combining probe functor type.</p>
359 <a name="probe_fn10954995" id="probe_fn10954995">probe_fn</a>
365 <a href="#Probe_Fn8454835"><tt>Probe_Fn</tt></a>
370 <p>Probe functor type.</p>
377 <a name="resize_policy4084493169" id=
378 "resize_policy4084493169">resize_policy</a>
384 <a href="#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
389 <p>Resize policy type.</p>
394 <h2><a name="link5" id="link5">Public Methods</a></h2>
396 <h3><a name="link6" id="link6">Constructors, Destructor, and
399 <table class="c1" width="100%" border="1" summary="Methods">
401 <td width="45%" align="left"><b>Method</b></td>
403 <td width="55%" align="left"><b>Description</b></td>
415 <p>Default constructor.</p>
423 (<b>const</b> <a href=
424 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn)
429 <p>Constructor taking some policy objects. <span class=
430 "c1"><tt>r_hash_fn</tt></span> will be copied by the
431 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
432 the container object.</p>
440 (<b>const</b> <a href=
441 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
442 <b>const</b> <a href=
443 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn)
448 <p>Constructor taking some policy objects. <span class=
449 "c1"><tt>r_hash_fn</tt></span> will be copied by the
450 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
451 the container object, and <span class=
452 "c1"><tt>r_eq_fn</tt></span> will be copied by the
453 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
454 container object.</p>
462 (<b>const</b> <a href=
463 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
464 <b>const</b> <a href=
465 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
466 <b>const</b> <a href=
467 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn)
472 <p>Constructor taking some policy objects. <span class=
473 "c1"><tt>r_hash_fn</tt></span> will be copied by the
474 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
475 the container object, <span class=
476 "c1"><tt>r_eq_fn</tt></span> will be copied by the
477 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
478 container object, and <span class=
479 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
481 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
482 object of the container object.</p>
490 (<b>const</b> <a href=
491 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
492 <b>const</b> <a href=
493 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
494 <b>const</b> <a href=
495 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn,
496 <b>const</b> <a href=
497 "#probe_fn10954995"><tt>probe_fn</tt></a> &r_probe_fn)
502 <p>Constructor taking some policy objects. <span class=
503 "c1"><tt>r_hash_fn</tt></span> will be copied by the
504 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
505 the container object, <span class=
506 "c1"><tt>r_eq_fn</tt></span> will be copied by the
507 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
508 container object, <span class=
509 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
511 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
512 object of the container object, and <span class=
513 "c1"><tt>r_probe_fn</tt></span> will be copied by the
514 <a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
515 of the container object.</p>
523 (<b>const</b> <a href=
524 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
525 <b>const</b> <a href=
526 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
527 <b>const</b> <a href=
528 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn,
529 <b>const</b> <a href=
530 "#probe_fn10954995"><tt>probe_fn</tt></a> &r_probe_fn,
531 <b>const</b> <a href=
532 "#resize_policy4084493169"><tt>resize_policy</tt></a> &r_resize_policy)
537 <p>Constructor taking some policy objects. <span class=
538 "c1"><tt>r_hash_fn</tt></span> will be copied by the
539 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
540 the container object, <span class=
541 "c1"><tt>r_eq_fn</tt></span> will be copied by the
542 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
543 container object, <span class=
544 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
546 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
547 object of the container object, <span class=
548 "c1"><tt>r_probe_fn</tt></span> will be copied by the
549 <a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
550 of the container object, and <span class=
551 "c1"><tt>r_resize_policy</tt></span> will be copied by
553 "#Resize_Policy566860465"><tt>Resize_Policy</tt></a>
554 object of the container object.</p>
570 <p>Constructor taking iterators to a range of
571 value_types. The value_types between <span class=
572 "c1"><tt>first_it</tt></span> and <span class=
573 "c1"><tt>last_it</tt></span> will be inserted into the
574 container object.</p>
586 <b>const</b> <a href=
587 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn)
592 <p>Constructor taking iterators to a range of value_types
593 and some policy objects. The value_types between
594 <span class="c1"><tt>first_it</tt></span> and
595 <span class="c1"><tt>last_it</tt></span> will be inserted
596 into the container object. <span class=
597 "c1"><tt>r_hash_fn</tt></span> will be copied by the
598 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
599 the container object.</p>
611 <b>const</b> <a href=
612 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
613 <b>const</b> <a href=
614 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn)
619 <p>Constructor taking iterators to a range of value_types
620 and some policy objects. The value_types between
621 <span class="c1"><tt>first_it</tt></span> and
622 <span class="c1"><tt>last_it</tt></span> will be inserted
623 into the container object. <span class=
624 "c1"><tt>r_hash_fn</tt></span> will be copied by the
625 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
626 the container object, and <span class=
627 "c1"><tt>r_eq_fn</tt></span> will be copied by the
628 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
629 container object.</p>
641 <b>const</b> <a href=
642 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
643 <b>const</b> <a href=
644 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
645 <b>const</b> <a href=
646 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn)
651 <p>Constructor taking iterators to a range of value_types
652 and some policy objects. The value_types between
653 <span class="c1"><tt>first_it</tt></span> and
654 <span class="c1"><tt>last_it</tt></span> will be inserted
655 into the container object. <span class=
656 "c1"><tt>r_hash_fn</tt></span> will be copied by the
657 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
658 the container object, <span class=
659 "c1"><tt>r_eq_fn</tt></span> will be copied by the
660 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
661 container object, and <span class=
662 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
664 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
665 object of the container object.</p>
677 <b>const</b> <a href=
678 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
679 <b>const</b> <a href=
680 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
681 <b>const</b> <a href=
682 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn,
683 <b>const</b> <a href=
684 "#probe_fn10954995"><tt>probe_fn</tt></a> &r_probe_fn)
689 <p>Constructor taking iterators to a range of value_types
690 and some policy objects. The value_types between
691 <span class="c1"><tt>first_it</tt></span> and
692 <span class="c1"><tt>last_it</tt></span> will be inserted
693 into the container object. <span class=
694 "c1"><tt>r_hash_fn</tt></span> will be copied by the
695 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
696 the container object, <span class=
697 "c1"><tt>r_eq_fn</tt></span> will be copied by the
698 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
699 container object, <span class=
700 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
702 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
703 object of the container object, and <span class=
704 "c1"><tt>r_probe_fn</tt></span> will be copied by the
705 <a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
706 of the container object.</p>
718 <b>const</b> <a href=
719 "#hash_fn2015995"><tt>hash_fn</tt></a> &r_hash_fn,
720 <b>const</b> <a href=
721 "#eq_fn80245"><tt>eq_fn</tt></a> &r_eq_fn,
722 <b>const</b> <a href=
723 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &r_comb_probe_fn,
724 <b>const</b> <a href=
725 "#probe_fn10954995"><tt>probe_fn</tt></a> &r_probe_fn,
726 <b>const</b> <a href=
727 "#resize_policy4084493169"><tt>resize_policy</tt></a> &r_resize_policy)
732 <p>Constructor taking iterators to a range of value_types
733 and some policy objects. The value_types between
734 <span class="c1"><tt>first_it</tt></span> and
735 <span class="c1"><tt>last_it</tt></span> will be inserted
736 into the container object. <span class=
737 "c1"><tt>r_hash_fn</tt></span> will be copied by the
738 <a href="#hash_fn2015995"><tt>hash_fn</tt></a> object of
739 the container object, <span class=
740 "c1"><tt>r_eq_fn</tt></span> will be copied by the
741 <a href="#eq_fn80245"><tt>eq_fn</tt></a> object of the
742 container object, <span class=
743 "c1"><tt>r_comb_probe_fn</tt></span> will be copied by
745 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
746 object of the container object, <span class=
747 "c1"><tt>r_probe_fn</tt></span> will be copied by the
748 <a href="#probe_fn10954995"><tt>probe_fn</tt></a> object
749 of the container object, and <span class=
750 "c1"><tt>r_resize_policy</tt></span> will be copied by
752 "#resize_policy4084493169"><tt>resize_policy</tt></a>
753 object of the container object.</p>
761 (<b>const</b> <span class=
762 "c2"><tt>gp_hash_table</tt></span> &other)
767 <p>Copy constructor.</p>
788 <span class="c2"><tt>gp_hash_table</tt></span> &
790 (<b>const</b> <span class=
791 "c2"><tt>gp_hash_table</tt></span> &other)
796 <p>Assignment operator.</p>
806 "c2"><tt>gp_hash_table</tt></span> &other)
811 <p>Swaps content.</p>
816 <h3><a name="link7" id="link7">Policy Access Methods</a></h3>
818 <table class="c1" width="100%" border="1" summary="Methods">
820 <td width="45%" align="left"><b>Method</b></td>
822 <td width="55%" align="left"><b>Description</b></td>
828 <a href="#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &
835 <p>Access to the <a href=
836 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
844 <b>const</b> <a href=
845 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a> &
852 <p>Const access to the <a href=
853 "#comb_probe_fn828996423"><tt>comb_probe_fn</tt></a>
861 <a href="#probe_fn10954995"><tt>probe_fn</tt></a> &
868 <p>Access to the <a href=
869 "#probe_fn10954995"><tt>probe_fn</tt></a> object.</p>
876 <b>const</b> <a href=
877 "#probe_fn10954995"><tt>probe_fn</tt></a> &
884 <p>Const access to the <a href=
885 "#probe_fn10954995"><tt>probe_fn</tt></a> object.</p>