38DynList<char> l3 = {
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k' };
39DynSetTree<char> l5 = {
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K' };
44 for (; it.has_curr(); it.next())
46 auto curr = it.get_curr();
47 cout <<
"curr = (" <<
get<0>(curr) <<
", " <<
get<1>(curr) <<
", "
59 for (
auto it =
get<3>(
lu).get_it(); it.has_curr(); it.next())
60 cout << it.get_curr() <<
" ";
63 auto l4 =
l1.
maps([] (
auto i) {
return 10*i; });
67 auto l = it.get_curr_list();
68 l.
for_each([] (
auto i) { cout << i <<
" "; });
74 l.
for_each([] (
auto i) { cout << i <<
" "; });
84 for (
auto it =
filter.get_it(); it.has_curr(); it.next())
86 auto & t = it.get_curr();
Zip iterators and functional operations for multiple containers.
Dynamic singly linked list with functional programming support.
Dynamic set backed by balanced binary search trees with automatic memory management.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
Aleph::DynList< __T > maps(Operation &op) const
Map the elements of the container.
Main namespace for Aleph-w library functions.
void zip_for_each(Op &&op, const Cs &...cs)
Apply op to every zipped tuple.
Container2< typename Container1::Item_Type > filter(Container1 &container, Operation &operation)
Filter elements that satisfy operation.
ZipIterator< Cs... > get_zip_it(const Cs &...cs)
Create a ZipIterator over the given containers.
auto zip_filter(Op op, const Cs &...cs)
Filter zipped tuples by predicate op.
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.
auto zip_lists(const C &c, const Lists &...lists)
Take several container of same type and some length and builds a list of lists.
auto t_enum_zip(const Cs &...cs)
Materialize enumerated zipped tuples into a DynList.
auto t_unzip(const DynList< std::tuple< Ts... > > &tuples)
Unzip a list of tuples into a tuple of lists.
Operation for_each(Itor beg, const Itor &end, Operation op)
Apply an operation to each element in a range.
Dynamic set implementations based on balanced binary search trees.