|
ORIGINAL
|
Implementation of map containers with different underlying data structures. More...
#include "allocator.h"#include "couple.h"#include "hash.h"#include "hashTable.h"#include "map.h"#include "ownerPtr.h"#include "comparator.h"#include "RBTree.h"#include "skipList.h"

Go to the source code of this file.
Classes | |
| class | original::hashMap< K_TYPE, V_TYPE, HASH, ALLOC > |
| Hash table based implementation of the map interface. More... | |
| class | original::hashMap< K_TYPE, V_TYPE, HASH, ALLOC >::Iterator |
| Bidirectional iterator for hashMap. More... | |
| class | original::treeMap< K_TYPE, V_TYPE, Compare, ALLOC > |
| Red-Black Tree based implementation of the map interface. More... | |
| class | original::treeMap< K_TYPE, V_TYPE, Compare, ALLOC >::Iterator |
| Bidirectional iterator for treeMap. More... | |
| class | original::JMap< K_TYPE, V_TYPE, Compare, ALLOC > |
| Skip List based implementation of the map interface. More... | |
| class | original::JMap< K_TYPE, V_TYPE, Compare, ALLOC >::Iterator |
| Forward iterator for JMap. More... | |
Namespaces | |
| namespace | original |
| Main namespace for the project Original. | |
| namespace | std |
| Standard namespace extensions for original::alternative. | |
Functions | |
| template<typename K_TYPE , typename V_TYPE , typename HASH , typename ALLOC > | |
| void | std::swap (original::hashMap< K_TYPE, V_TYPE, HASH, ALLOC > &lhs, original::hashMap< K_TYPE, V_TYPE, HASH, ALLOC > &rhs) noexcept |
| std::swap specialization for hashMap | |
| template<typename K_TYPE , typename V_TYPE , typename COMPARE , typename ALLOC > | |
| void | std::swap (original::treeMap< K_TYPE, V_TYPE, COMPARE, ALLOC > &lhs, original::treeMap< K_TYPE, V_TYPE, COMPARE, ALLOC > &rhs) noexcept |
| std::swap specialization for treeMap | |
| template<typename K_TYPE , typename V_TYPE , typename COMPARE , typename ALLOC > | |
| void | std::swap (original::JMap< K_TYPE, V_TYPE, COMPARE, ALLOC > &lhs, original::JMap< K_TYPE, V_TYPE, COMPARE, ALLOC > &rhs) noexcept |
| std::swap specialization for JMap | |
Implementation of map containers with different underlying data structures.
Provides three map implementations with different performance characteristics and iteration capabilities:
Common Features:
Performance Characteristics:
| Container | Insertion | Lookup | Deletion | Ordered | Memory Usage | Iterator Type |
|---|---|---|---|---|---|---|
| hashMap | O(1) avg | O(1) | O(1) | No | Medium-High | Forward-only |
| treeMap | O(log n) | O(log n) | O(log n) | Yes | Low | Bidirectional |
| JMap | O(log n) avg | O(log n) | O(log n) | Yes | Medium | Forward-only |
Memory Characteristics:
| Container | Node Structure | Overhead | Rehashing | Balance Operations |
|---|---|---|---|---|
| hashMap | Key-Value + Next | 1 pointer | Yes | No |
| treeMap | Key-Value + Parent/Child/Color | 3 pointers + color | No | Yes (Red-Black) |
| JMap | Key-Value + Multi-level links | ~2 pointers avg | No | Probabilistic |
Usage Guidelines:
Iterator Invalidation:
Key Requirements:
Exception Safety: