38#include <gtest/gtest.h>
62 bool operator()(
int a,
int b)
const noexcept {
return a > b; }
95 auto * p1 = m.
insert(1, 10);
97 auto * p2 = m.
insert(1, 20);
168 auto keys = m.
keys();
223 static_assert(std::is_same_v<DynMapTree<int, int>::Key_Type,
int>);
224 static_assert(std::is_same_v<DynMapTree<int, int>::Value_Type,
int>);
229 ::testing::InitGoogleTest(&
argc,
argv);
Dynamic singly linked list with functional programming support.
T & append(const T &item)
Append a new item by copy.
T & get_first() const
Return the first item of the list.
Generic key-value map implemented on top of a binary search tree.
static const Key & get_key(Data *data_ptr) noexcept
void remove_key(const Key &key)
typename Base::Iterator Iterator
Data remove(const Key &key)
Deletes the pair key,data
Pair * put(const Key &key, const Data &data)
Alias for insert().
Pair * append(const Key &key, const Data &data)
DynList< Pair * > items_ptr()
Collect pointers to all stored pairs.
Pair * search(const Key &key) const noexcept
Collect all keys.
bool has(const Key &key) const noexcept
DynList< Key > keys() const
Pair * insert(const Key &key, const Data &data)
Insert a key-value pair.
bool contains(const Key &key) const noexcept
static Data & get_data(Key &key) noexcept
DynList< Data > values() const
Collect all values.
DynList< Data * > values_ptr()
Collect pointers to all values.
Data & find(const Key &key)
Find the value associated with key.
const size_t & size() const
Returns the cardinality of the set.
bool is_empty() const
returns true if the set is empty
size_t size() const noexcept
Count the number of elements of the list.
Main namespace for Aleph-w library functions.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Dynamic key-value map based on balanced binary search trees.