38#include <gtest/gtest.h>
62 bool operator()(
int a,
int b)
const noexcept {
return a > b; }
169 auto values =
m.values();
179 auto vp =
m.values_ptr();
180 auto ip =
m.items_ptr();
186 *
vp.get_first() =
"ONE";
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)
Generic key-value map implemented on top of a binary search tree.
static const Key & get_key(Data *data_ptr) noexcept
typename Base::Iterator Iterator
static Data & get_data(Key &key) noexcept
Key * search(const Key &key) const noexcept
searches the table for the key.
constexpr bool contains(const Key &key) const noexcept
Alias for has().
void remove(const Key &key)
Remove a key from the hash table.
Key * append(const Key &key)
Alias for insert() (copy version).
constexpr size_t size() const noexcept
Returns the number of entries in the table.
constexpr bool is_empty() const noexcept
Checks if the table is empty.
DynList< Key > keys() const
Returns a list containing all keys in the table.
Key * insert(const Key &key)
Inserts a key into the hash table (copy version).
constexpr bool has(const Key &key) const noexcept
Checks if a key exists in the table.
Key & find(const Key &key)
Finds a key and returns a reference to it.
Main namespace for Aleph-w library functions.
Divide_Conquer_DP_Result< Cost > divide_and_conquer_partition_dp(const size_t groups, const size_t n, Transition_Cost_Fn transition_cost, const Cost inf=dp_optimization_detail::default_inf< Cost >())
Optimize partition DP using divide-and-conquer optimization.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
Dynamic key-value map based on balanced binary search trees.