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();
106 <
typename Key,
typename Data,
114 void add(std::initializer_list<Key>
lk, std::initializer_list<Data> ld)
117 <<
"size mismatch between domain and range";
119 auto itk =
lk.begin();
120 auto itd = ld.begin();
127 HashMap(std::initializer_list<Key>
lk, std::initializer_list<Data> ld)
137 <<
"size mismatch between domain and range";
139 auto itd = ld.begin();
140 c.for_each( [
this, &
itd](
const Key & key)
142 set_entry(key, *
itd++);
155 using Base::contains;
169 template <
typename Key,
178 template <
typename Key,
typename Data,
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.
Doubly-linked list (defined in tpl_dynList.H).
Open addressing hash table with linear probing collision resolution.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Main namespace for Aleph-w library functions.
HashMapTable< Key, Data, Cmp > Base
void add(std::initializer_list< Key > lk, std::initializer_list< Data > ld)
bool is_empty() const noexcept
Checks if the container is empty.
void clear()
Empties the container.
HashMap(const Container< Key > &c, std::initializer_list< Data > ld)
HashMap(std::initializer_list< Key > lk, std::initializer_list< Data > ld)
void clear()
Empties the container.
void add(const DynList< Key > &l)
bool is_empty() const noexcept
Checks if the container is empty.
HashSetTable< Key, Cmp > Base
Open addressing hash map using linear probing.
Dynamic map with open hashing.
Dynamic set implementations based on hash tables.