111 for (
size_t j = 0; j <
ncol; ++j)
114 for (
size_t i = 0; i <
nrow; ++i)
138 template <
typename T>
147 for (
auto it =
l.
get_it(); it.has_curr(); it.next_ne())
148 mat.
append(it.get_curr());
153 for (
size_t i = 1; i <
nrow; ++i)
158 for (
size_t j = 0; j <
ncol; ++j)
161 for (
size_t i = 0; i <
nrow; ++i)
189 template <
template <
typename>
class C,
typename T>
201 for (
size_t i = 0; i <
nrow; ++i)
204 for (
size_t j = 0; j <
ncol; ++j)
207 for (
size_t i = 0; i <
nrow; ++i)
209 mat.append(std::move(
row));
227 template <
typename T>
264 for (
size_t j = 0; j <
ncol; ++j)
267 for (
size_t i = 0; i <
nrow; ++i)
290 template <
typename T,
class Op>
296 return op(
sample.template
maps<T>([](
const T & i) { return i; }));
299 for (
auto it =
itor; it.has_curr(); it.next_ne())
301 auto item = it.get_curr();
353 template <
typename T,
class Op>
375 template <
typename T,
class Op>
393 template <
typename T,
class Op>
408 template <
typename T,
class Op>
425 template <
typename T>
446 template <
typename T>
477 template <
typename T,
typename Tc,
class Op = Dft_Fold_Op<Tc, T>>
494 template <
typename T,
typename Tc,
class Op = Dft_Fold_Op<Tc, T>>
512 template <
typename T>
517 for (
auto it =
l.
get_it(); it.has_curr(); it.next_ne())
519 const size_t sz = it.get_curr().size();
539 template <
typename T,
class Pred>
560 template <
typename T,
class Pred>
579 template <
typename T,
class Pred>
590 template <
typename T,
class Pred>
609 template <
typename T,
class Pred>
620 template <
typename T,
class Pred>
637 template <
typename T,
class Pred>
654 template <
typename T,
class Pred>
672 template <
typename R,
typename T,
class Op>
688 template <
typename R,
typename T,
class Op>
High-level sorting functions for Aleph containers.
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
Iterator on the items of list.
Dynamic singly linked list with functional programming support.
T & insert(const T &item)
Insert a new item by copy.
T & append(const T &item)
Append a new item by copy.
T & get_first() const
Return the first item of the list.
DynList & swap(DynList &l) noexcept
Swap this with l.
Dynamic set backed by balanced binary search trees with automatic memory management.
bool has_curr() const noexcept
Return true if iterator has current item.
Single linked list of nodes.
constexpr bool is_empty() const noexcept
Return true if list is empty.
size_t size() const noexcept
Count the number of elements of the list.
Link of a single linked list non-circular and without header node.
Node belonging to a single non-circular linked list without header node.
auto get_it() const
Return a properly initialized iterator positioned at the first item on the container.
Singly linked list implementations with head-tail access.
Freq_Node * pred
Predecessor node in level-order traversal.
Main namespace for Aleph-w library functions.
bool none_perm(const DynList< DynList< T > > &l, Pred &pred)
Check if no permutation satisfies a predicate.
DynList< DynList< T > > build_combs(const DynList< DynList< T > > &l)
Build the set of unique combinations from a list of lists.
DynList< R > map_perm(const DynList< DynList< T > > &l, Op &op)
Transform each permutation via a mapping operation.
size_t size(Node *root) noexcept
T fold_perm(const T &init, const DynList< DynList< Tc > > &l, Op &op)
Left-fold over all permutations.
size_t perm_count(const DynList< DynList< T > > &l)
Count the total number of permutations from a list of lists.
bool traverse_perm(const DynList< DynList< T > > &l, Op &op)
Traverse all the possible permutations that can be done of a list of lists and on each permutation pe...
DynList< DynList< T > > filter_perm(const DynList< DynList< T > > &l, Pred &pred)
Filter permutations that satisfy a predicate.
std::decay_t< typename HeadC::Item_Type > T
DynArray< T > sort(const DynArray< T > &a, Cmp &&cmp=Cmp())
Returns a sorted copy of a DynArray.
void for_each_perm(const DynList< DynList< T > > &l, Op &op)
Apply a procedure to every permutation produced by traverse_perm.
DynList< DynList< T > > transpose(const DynList< DynList< T > > &l)
Transpose a matrix represented as a list of lists.
DynList< DynList< T > > build_perms(const DynList< DynList< T > > &l)
Materialize all permutations from a list of lists.
void in_place_transpose(C< C< T > > &l)
In-place transpose of a rectangular matrix stored as a nested container.
bool exists_perm(const DynList< DynList< T > > &l, Pred &pred)
Check if any permutation satisfies a predicate.
bool all_perm(const DynList< DynList< T > > &l, Pred &pred)
Check if all permutations satisfy a predicate.
DynList< T > maps(const C &c, Op op)
Classic map operation.
Itor::difference_type count(const Itor &beg, const Itor &end, const T &value)
Count elements equal to a value.
AVL binary search tree with nodes without virtual destructor.
Dynamic array container with automatic resizing.
Lazy and scalable dynamic array implementation.
Dynamic doubly linked list implementation.
Dynamic set implementations based on balanced binary search trees.