A concrete general-probing hash-based associative container.
Defined in: assoc_container.hpp
Parameter | Description | Default Value |
typename Key |
Key type. |
- |
typename Mapped |
Mapped type. |
- |
class Hash_Fn |
Hash functor. |
__gnu_cxx::hash<Key>if using gcc; stdext::hash_value<Key>if using Visual C++ .net |
class Eq_Fn |
Equivalence functor. |
std::equal_to<Key> |
class Comb_Probe_Fn |
Combining probe functor. If Hash_Fn is null_hash_fn, and Probe_Fn is null_probe_fn, then this is the ranged-probe functor; otherwise, this is the range-hashing functor. |
direct_mask_range_hashing |
class Probe_Fn |
Probe functor. |
If Comb_Probe_Fn
is direct_mask_range_hashing, then
linear_probe_fn< typename Comb_Probe_Fn::size_type>otherwise, quadratic_probe_fn< typename Comb_Probe_Fn::size_type> |
class Resize_Policy |
Resize policy. |
If Comb_Probe_Fn
is direct_mask_range_hashing,
then
hash_standard_resize_policy< hash_exponential_size_policy< typename Comb_Probe_Fn::size_type>, hash_load_check_resize_trigger< typename Comb_Probe_Fn::size_type>, false, typename Comb_Probe_Fn::size_type>otherwise, hash_standard_resize_policy< hash_exponential_size_policy< typename Comb_Probe_Fn::size_type>, hash_load_check_resize_trigger< typename Comb_Probe_Fn::size_type>, false, typename Comb_Probe_Fn::size_type> |
bool Store_Hash |
Indicates whether the hash value will be stored along with each key. If hash_fn is null_hash_fn, then the container will not compile if this value is true |
false |
class Allocator |
Allocator type. |
std::allocator<char> |
Class | Derivation Type |
basic_hash_table |
public |
Type | Definition | Description |
hash_fn |
Hash_Fn |
Hash functor type. |
eq_fn |
Eq_Fn |
Equivalence functor type. |
comb_probe_fn |
Comb_Probe_Fn |
Combining probe functor type. |
probe_fn |
Probe_Fn |
Probe functor type. |
resize_policy |
Resize_Policy |
Resize policy type. |
Method | Description |
gp_hash_table () |
Default constructor. |
gp_hash_table (const hash_fn &r_hash_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object. |
gp_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, and r_eq_fn will be copied by the eq_fn object of the container object. |
gp_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, and r_comb_probe_fn will be copied by the comb_probe_fn object of the container object. |
gp_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn, const probe_fn &r_probe_fn) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_probe_fn will be copied by the comb_probe_fn object of the container object, and r_probe_fn will be copied by the probe_fn object of the container object. |
gp_hash_table (const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn, const probe_fn &r_probe_fn, const resize_policy &r_resize_policy) |
Constructor taking some policy objects. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_probe_fn will be copied by the comb_probe_fn object of the container object, r_probe_fn will be copied by the probe_fn object of the container object, and r_resize_policy will be copied by the Resize_Policy object of the container object. |
template< class It> gp_hash_table (It first_it, It last_it) |
Constructor taking iterators to a range of value_types. The value_types between first_it and last_it will be inserted into the container object. |
template< class It> gp_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object. |
template< class It> gp_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, and r_eq_fn will be copied by the eq_fn object of the container object. |
template< class It> gp_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, and r_comb_probe_fn will be copied by the comb_probe_fn object of the container object. |
template< class It> gp_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn, const probe_fn &r_probe_fn) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_probe_fn will be copied by the comb_probe_fn object of the container object, and r_probe_fn will be copied by the probe_fn object of the container object. |
template< class It> gp_hash_table (It first_it, It last_it, const hash_fn &r_hash_fn, const eq_fn &r_eq_fn, const comb_probe_fn &r_comb_probe_fn, const probe_fn &r_probe_fn, const resize_policy &r_resize_policy) |
Constructor taking iterators to a range of value_types and some policy objects. The value_types between first_it and last_it will be inserted into the container object. r_hash_fn will be copied by the hash_fn object of the container object, r_eq_fn will be copied by the eq_fn object of the container object, r_comb_probe_fn will be copied by the comb_probe_fn object of the container object, r_probe_fn will be copied by the probe_fn object of the container object, and r_resize_policy will be copied by the resize_policy object of the container object. |
gp_hash_table
(const gp_hash_table &other)
|
Copy constructor. |
virtual ~gp_hash_table () |
Destructor. |
gp_hash_table & operator= (const gp_hash_table &other) |
Assignment operator. |
void
swap
(gp_hash_table &other)
|
Swaps content. |
Method | Description |
comb_probe_fn & get_comb_probe_fn () |
Access to the comb_probe_fn object. |
const comb_probe_fn & get_comb_probe_fn () const |
Const access to the comb_probe_fn object. |
probe_fn & get_probe_fn () |
Access to the probe_fn object. |
const probe_fn & get_probe_fn () const |
Const access to the probe_fn object. |