52# include <initializer_list>
59 template <
typename Key,
79 Key &
get_first()
const {
return this->get_it().get_curr(); }
83 auto it = this->get_it();
90 <
typename Key,
typename Data,
98 void add(std::initializer_list<Key>
lk, std::initializer_list<Data> ld)
101 <<
"size mismatch between domain and range";
111 HashMap(std::initializer_list<Key>
lk, std::initializer_list<Data> ld)
121 <<
"size mismatch between domain and range";
124 c.for_each( [
this, &
itd](
const Key & key)
126 set_entry(key, *
itd++);
Exception handling system with formatted messages for Aleph-w.
#define ah_range_error_if(C)
Throws std::range_error if condition holds.
#define Generate_Proxy_Operator(Class_Name)
Generates operator[] for map-like containers.
#define Special_Ctors(Set_Type, Type)
Generates special constructors for containers.
Dynamic singly linked list with functional programming support.
size_t size() const noexcept
Count the number of elements of the list.
Open addressing hash table with double hashing collision resolution.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
iterator end() noexcept
Return an STL-compatible end iterator.
iterator begin() noexcept
Return an STL-compatible iterator to the first element.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
HashMapTable< Key, Data, Cmp > Base
void add(std::initializer_list< Key > lk, std::initializer_list< Data > ld)
HashMap(const Container< Key > &c, std::initializer_list< Data > ld)
HashMap(std::initializer_list< Key > lk, std::initializer_list< Data > ld)
void add(const DynList< Key > &l)
HashSetTable< Key, Cmp > Base
Open addressing hash map using double hashing.
Dynamic map with open hashing.
Dynamic set implementations based on hash tables.