6#include <gtest/gtest.h>
39 std::declval<std::vector<int> &>()))>);
40static_assert(AlephIterator<
decltype(
stl_zip_it(std::declval<std::vector<int> &>(),
41 std::declval<std::list<int> &>()))>);
57namespace U = uni_functional_detail;
58namespace Z = uni_zip_detail;
59namespace F = stl_detail;
75 static_assert(AlephSequence<
decltype(
l)>);
77 for (
auto it =
l.
get_it(); it.has_curr(); it.next_ne())
86 for (
int i : {1, 2, 3})
101 for (
auto it =
uni_zip_it(
l, t); it.has_curr(); it.next())
103 auto [x, bucket] = it.get_curr();
114 template <AlephIterator It>
118 for (; it.has_curr(); it.
next_ne())
127 for (
int i = 0; i < 4; ++i)
146 std::vector<int> b = {4, 5};
147 std::list<int> c = {6, 7, 8};
Functional programming utilities for C++ Standard Library containers.
Lazy zip iterators and functional operations for STL containers.
Unified functional programming utilities for both STL and Aleph containers.
Unified zip operations for both STL and Aleph containers.
size_t size_t int32_t value
Doubly-linked list (defined in tpl_dynList.H).
T & insert(const T &item)
T & append(const T &item)
Iterator specialized for DynSlist returning payload references.
Dynamic list of elements of type T implemented with a singly linked list of nodes.
Generic filter iterator wrapper.
void next()
Advances the iterator to the next filtered element.
void next_ne() noexcept
Advances the iterator to the next filtered element (noexcept version).
Bucket * insert(Bucket *bucket)
Inserts bucket into the table and returns its address if the key is not already in the table; otherwi...
size_t size() const noexcept
Count the number of elements of the list.
Simple, scalable and fast dynamic array.
Iterator over singly linked nodes.
Iterator that pairs each element with its index.
auto get_it() const
Return a properly initialized iterator positioned at the first item on the container.
Key * append(const Key &key)
Alias for insert() (copy version).
size_t blossom_maximum_cardinality_matching(const GT &g, DynDlist< typename GT::Arc * > &matching, SA sa=SA())
Alias of compute_maximum_cardinality_general_matching().
Singly linked list implementations with head-tail access.
Main namespace for Aleph-w library functions.
constexpr auto stl_zip_it(const Containers &... cs)
Get a zip iterator over STL containers.
and
Check uniqueness with explicit hash + equality functors.
auto uni_zip_it(const Containers &... cs)
Get a unified zip iterator.
void uni_for_each(Op &&op, const Container &c)
Apply operation to each element (for_each).
T sum(const Container &container, const T &init=T{})
Compute sum of all elements.
Generic hash table with collision resolution by separate chaining and buckets without virtual destruc...
Detect if a container has reverse iterators.
Detect if a type has a size() method.
Detect if a type is hashable via std::hash.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
Dynamic array container with automatic resizing.
Lazy and scalable dynamic array implementation.
Dynamic doubly linked list implementation.
Dynamic key-value map based on balanced binary search trees.
Dynamic set implementations based on balanced binary search trees.
Dynamic singly linked list.
Sorted-array set (Aleph::FlatSet), a cache-friendly ordered set.
Linear hashing with dynamic bucket expansion.
Simple, scalable, contiguous dynamic array.