#include <hash_table.h>
Collaboration diagram for Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >:
based on the sgi implementation: http://www.sgi.com/tech/stl/HashedAssociativeContainer.html
_Key: hash key type _Data: key + value data to store _HashFcn: functional class providing a hash function: int(_Key) Note: in some STL implementations hash is already part of some extension an in namespace std or stdext, in some it is not. So we assume that it is not available. :TODO: _EqualKey: functional class providing a comparison function: bool(_Key, _Key) returns true iff two keys are considered to be equal _ExtractKey: extracts key from _Data: _Key(_Data)
Definition at line 120 of file hash_table.h.
typedef Hash::size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::size_type |
typedef _Key Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::key_type |
Definition at line 127 of file hash_table.h.
typedef _Value Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::value_type |
Definition at line 128 of file hash_table.h.
typedef _HashFcn Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hasher |
Definition at line 129 of file hash_table.h.
typedef _EqualKey Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::key_equal |
Definition at line 130 of file hash_table.h.
typedef BucketNode Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::Bucket [protected] |
Definition at line 146 of file hash_table.h.
typedef std::vector<Bucket*> Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::Data [protected] |
Definition at line 149 of file hash_table.h.
typedef Data::iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::data_iter [protected] |
Definition at line 150 of file hash_table.h.
typedef Data::const_iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::data_const_iter [protected] |
Definition at line 151 of file hash_table.h.
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table | ( | ) | [inline] |
constructors
Definition at line 276 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init().
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table | ( | size_type | initial_capacity | ) | [inline] |
Definition at line 284 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init().
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table | ( | size_type | initial_capacity, | |
const _HashFcn & | hash | |||
) | [inline] |
Definition at line 292 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init().
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table | ( | size_type | initial_capacity, | |
const _HashFcn & | hash, | |||
const _EqualKey & | equal | |||
) | [inline] |
Definition at line 300 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init().
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table | ( | const hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey > & | other | ) | [inline] |
Definition at line 309 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::assignTable(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data.
Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::~hash_table | ( | ) | [inline] |
Definition at line 316 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::clear().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash | ( | const key_type & | key | ) | const [inline, protected] |
template parameters
Definition at line 193 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_hash.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketIndex(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::resize().
bool Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::equal | ( | const key_type & | key1, | |
const key_type & | key2 | |||
) | const [inline, protected] |
Definition at line 198 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_equal.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find().
const key_type& Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::extractKey | ( | const value_type & | value | ) | const [inline, protected] |
Definition at line 203 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_extractKey.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::resize().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketIndex | ( | const key_type & | key | ) | const [inline, protected] |
bucket retrieval
Definition at line 212 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash().
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByKey().
Bucket* Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByKey | ( | const key_type & | key | ) | [inline, protected] |
Definition at line 216 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByIndex(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketIndex().
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find().
const Bucket* Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByKey | ( | const key_type & | key | ) | const [inline, protected] |
Definition at line 220 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByIndex(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketIndex().
Bucket* Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByIndex | ( | const size_type | index | ) | [inline, protected] |
Definition at line 224 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, and DebugAssert.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByKey().
const Bucket* Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByIndex | ( | const size_type | index | ) | const [inline, protected] |
Definition at line 229 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, and DebugAssert.
void Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::resize | ( | ) | [inline, protected] |
resize
Definition at line 239 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_next, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_value, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::extractKey(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::load_factor(), Hash::next_prime(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::size().
hash_table& Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator= | ( | const hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey > & | other | ) | [inline] |
Definition at line 321 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::assignTable(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::clear(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_equal, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_extractKey, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_hash, and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_size.
void Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::assignTable | ( | const Data & | data | ) | [inline] |
Definition at line 337 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_next, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_value, and DebugAssert.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator=().
void Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::swap | ( | hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey > & | other | ) | [inline] |
Definition at line 369 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_equal, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_extractKey, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_hash, and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_size.
Referenced by Hash::hash_set< int >::swap(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::swap().
void Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init | ( | ) | [inline] |
Definition at line 378 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table().
void Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::clear | ( | ) | [inline] |
Definition at line 385 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data, and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_size.
Referenced by Hash::hash_set< int >::clear(), Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::clear(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator=(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::~hash_table().
iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find | ( | const key_type & | key | ) | [inline] |
operations
Definition at line 405 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_next, Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::equal(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::extractKey(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByKey().
Referenced by Hash::hash_set< int >::find(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::find().
const_iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find | ( | const key_type & | key | ) | const [inline] |
Definition at line 415 of file hash_table.h.
std::pair<iterator, bool> Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::insert | ( | const value_type & | value | ) | [inline] |
Definition at line 427 of file hash_table.h.
Referenced by Hash::hash_set< int >::insert(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::insert().
value_type& Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::find_or_insert | ( | const value_type & | value | ) | [inline] |
Definition at line 450 of file hash_table.h.
Referenced by Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::operator[]().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::erase | ( | const key_type & | key | ) | [inline] |
Definition at line 474 of file hash_table.h.
References Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::BucketNode::d_next.
Referenced by Hash::hash_set< int >::erase(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::erase().
bool Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::contains | ( | const key_type & | key | ) | const [inline] |
status
Definition at line 506 of file hash_table.h.
Referenced by Hash::hash_set< int >::contains(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::contains().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::count | ( | const _Key & | key | ) | const [inline] |
Definition at line 512 of file hash_table.h.
Referenced by Hash::hash_set< int >::count(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::count().
bool Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::empty | ( | ) | const [inline] |
Definition at line 522 of file hash_table.h.
Referenced by Hash::hash_set< int >::empty(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::empty().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::size | ( | ) | const [inline] |
Definition at line 527 of file hash_table.h.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::resize(), Hash::hash_set< int >::size(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::size().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::bucket_count | ( | ) | const [inline] |
Definition at line 532 of file hash_table.h.
Referenced by Hash::hash_set< int >::bucket_count(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::bucket_count().
float Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::load_factor | ( | ) | const [inline] |
iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::begin | ( | ) | [inline] |
iterators
Definition at line 546 of file hash_table.h.
Referenced by Hash::hash_set< int >::begin(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::begin().
const_iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::begin | ( | ) | const [inline] |
Definition at line 562 of file hash_table.h.
iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::end | ( | ) | [inline] |
Definition at line 579 of file hash_table.h.
Referenced by Hash::hash_set< int >::end(), and Hash::hash_map< CVC3::Expr, CVC3::CDOmap< CVC3::Expr, CVC3::Expr, HashFcn > * >::end().
const_iterator Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::end | ( | ) | const [inline] |
Definition at line 584 of file hash_table.h.
friend class iterator [friend] |
Definition at line 156 of file hash_table.h.
friend class const_iterator [friend] |
Definition at line 158 of file hash_table.h.
hasher Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_hash [protected] |
template parameters
Definition at line 169 of file hash_table.h.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator=(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::swap().
key_equal Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_equal [protected] |
_ExtractKey Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_extractKey [protected] |
Definition at line 175 of file hash_table.h.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::extractKey(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator=(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::swap().
size_type Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_size [protected] |
Data Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::d_data [protected] |
Definition at line 182 of file hash_table.h.
Referenced by Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::assignTable(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::clear(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketByIndex(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::getBucketIndex(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::hash_table(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::init(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::operator=(), Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::resize(), and Hash::hash_table< _Key, _Value, _HashFcn, _EqualKey, _ExtractKey >::swap().