38# include <gtest/gtest.h>
74constexpr auto my_less = [](
const int & a,
const int & b) {
return a < b; };
162 for (
int i = 0; i < 5; ++i) arr.
append(i);
165 for (
size_t i = 0; i < arr.
size(); ++i)
173 for (
int i = 0; i < 4; ++i)
lst.
append(
static_cast<double>(i));
182 for (
int i = 0; i < 6; ++i) arr.
append(i);
219 for (
int i = 0; i < 5; ++i) arr.
append(0);
222 for (
size_t i = 0; i < arr.
size(); ++i)
223 EXPECT_EQ(arr[i],
static_cast<int>(10 + i));
229 for (
int i = 0; i < 4; ++i) arr.
append(0);
239 for (
int i = 0; i < 3; ++i)
lst.
append(0);
272 for (
int i = 0; i < 4; ++i) arr.
append(0.0);
276 for (
size_t i = 0; i < arr.
size(); ++i)
C++20 concepts for constraining comparison functors.
Standard functor implementations and comparison objects.
Functional programming utilities for Aleph-w containers.
bool(*)(const int &, const int &) BoolBinFn
Simple dynamic array with automatic resizing and functional operations.
constexpr size_t size() const noexcept
Return the number of elements stored in the stack.
T & append(const T &data)
Append a copy of data
size_t size() const noexcept
Return the current dimension of array.
T & append()
Allocate a new entry to the end of array.
Dynamic doubly linked list with O(1) size and bidirectional access.
T & append(const T &item)
Append a copied item at the end of the list.
Dynamic singly linked list with functional programming support.
Node * search(const Key &key) const noexcept
Search a node containing key; if found, then a pointer to the node containing it is returned; otherwi...
Node * insert(Node *p) noexcept
Insert the node pointed by p in the tree.
Node * remove(const Key &key) noexcept
Remove from an AVL tree the node containing key key.
Open addressing hash table with double hashing collision resolution.
Key * search(const Key &key) const noexcept
searches the table for the key.
void remove(const Key &key)
Remove a key from the hash table.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
Key * insert(const Key &key)
Inserts a key into the hash table (copy version).
Concept for Aleph-w mutable sequential containers.
Concept for BST tree policies used by DynSetTree.
A callable that takes two const T& and returns bool.
Equivalence relation constraint for equality comparators.
Strict weak ordering constraint for BST comparators.
Singly linked list implementations with head-tail access.
Main namespace for Aleph-w library functions.
void fill(Itor beg, const Itor &end, const T &value)
Fill a range with a value.
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.
void iota(C &container, typename C::Item_Type start)
Fill all elements of a container with unit-step sequential values.
DynList< T > rep(const size_t n, const T &item)
Create a sequence of repeated items.
AVL binary search tree with nodes without virtual destructor.
bool operator()(int) const
void operator()(int, int) const
Dynamic array container with automatic resizing.
AVL tree implementation (height-balanced BST).
Lazy and scalable dynamic array implementation.
Dynamic doubly linked list implementation.
Open addressing hash table with double hashing.
Top-down splay tree implementation (without rank support).