|
Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
|
#include <chain_hash_map.h>


Data Structures | |
| class | iter_rep |
Public Member Functions | |
| ChainHashMap () | |
| Creates an empty map. | |
| const_iterator | begin () const |
| const_iterator | end () const |
Public Member Functions inherited from dsac::map::AbstractHashMap< Key, Value, Hash > | |
| int | size () const |
| Returns the number of entries in the map. | |
| const_iterator | find (const Key &k) const |
| Returns a const_iterator to the entry with a given key, or end() if no such entry exists. | |
| const_iterator | erase (const_iterator loc) |
| Removes the entry indicated by the given iterator, and returns iterator to next entry in iteration order. | |
| const_iterator | put (const Key &k, const Value &v) |
| virtual const_iterator | begin () const=0 |
| virtual const_iterator | end () const=0 |
Public Member Functions inherited from dsac::map::AbstractMap< Key, Value > | |
| bool | empty () const |
| Returns true if the map is empty, false otherwise. | |
| bool | contains (const Key &k) const |
| Returns true if the map contains an entry with the given key. | |
| const Value & | at (const Key &k) const |
| bool | erase (const Key &k) |
| virtual | ~AbstractMap () |
| virtual int | size () const =0 |
| virtual const_iterator | begin () const =0 |
| virtual const_iterator | end () const =0 |
| virtual const_iterator | find (const Key &k) const =0 |
| virtual const_iterator | put (const Key &k, const Value &v)=0 |
| virtual const_iterator | erase (const_iterator loc)=0 |
Protected Types | |
| typedef AbstractHashMap< Key, Value, Hash > | Base |
| typedef UnorderedListMap< Key, Value > | Bucket |
| typedef Bucket::const_iterator | BCI |
Protected Types inherited from dsac::map::AbstractHashMap< Key, Value, Hash > | |
| typedef AbstractMap< Key, Value > | Base |
Protected Member Functions | |
| void | create_table () |
| const_iterator | bucket_find (int h, const Key &k) const |
| const_iterator | bucket_put (int h, const Key &k, const Value &v) |
| const_iterator | bucket_erase (int h, const_iterator loc) |
Protected Member Functions inherited from dsac::map::AbstractHashMap< Key, Value, Hash > | |
| int | get_hash (const Key &k) const |
| void | resize (int new_table_size) |
| virtual void | create_table ()=0 |
| virtual const_iterator | bucket_find (int h, const Key &k) const =0 |
| virtual const_iterator | bucket_put (int h, const Key &k, const Value &v)=0 |
| virtual const_iterator | bucket_erase (int h, const_iterator loc)=0 |
Protected Member Functions inherited from dsac::map::AbstractMap< Key, Value > | |
| abstract_iter_rep * | get_rep (const_iterator iter) const |
| void | update_value (const Entry &e, const Value &v) |
Protected Attributes | |
| std::vector< Bucket > | table |
| int | table_sz |
| int | sz |
Protected Attributes inherited from dsac::map::AbstractHashMap< Key, Value, Hash > | |
| Hash | hash |
| int | sz {0} |
| int | table_sz {17} |
|
protected |
|
protected |
|
protected |
|
inline |
Creates an empty map.

|
inlinevirtual |
Reimplemented from dsac::map::AbstractHashMap< Key, Value, Hash >.

|
inlineprotectedvirtual |
Implements dsac::map::AbstractHashMap< Key, Value, Hash >.

|
inlineprotectedvirtual |
Implements dsac::map::AbstractHashMap< Key, Value, Hash >.

|
inlineprotectedvirtual |
Implements dsac::map::AbstractHashMap< Key, Value, Hash >.
|
inlineprotectedvirtual |
Implements dsac::map::AbstractHashMap< Key, Value, Hash >.
|
inlinevirtual |
Reimplemented from dsac::map::AbstractHashMap< Key, Value, Hash >.
|
protected |
|
protected |
|
protected |