44 cout << it.get_curr() <<
" ";
46 cout <<
"size = " <<
l.
size() <<
" **" <<
endl;
92 cerr <<
"Error: n and m must be positive integers." <<
endl;
96 unsigned int t = std::time(0);
112 cout <<
argv[0] <<
" " << n <<
" " <<
m <<
" " << t <<
endl;
117 for (i = 0; i < n; i++)
121 for (
int k = 0;
k <
m; ++
k)
130 cerr <<
"Error: List is empty, cannot get first element." <<
endl;
140 cout << it.get_curr() <<
endl;
Functional programming utilities for Aleph-w containers.
bool has_curr() const noexcept
Return true if the iterator has current item.
constexpr bool is_empty() const noexcept
Return true if this (as header node) is empty.
Dynamic doubly linked list with O(1) size and bidirectional access.
T & get_first() const
Return a modifiable reference to first item in the list.
T & insert(const T &item)
Insert a copy of item at the beginning of the list.
T & append(const T &item)
size_t size() const noexcept
Count the number of elements of the list.
bool all(Operation &operation) const
Check if all the elements of the container satisfy a condition.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
Singly linked list implementations with head-tail access.
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.
Container< T > range(const T start, const T end, const T step=1)
Generate a range of values [start, end] with a given step.
FooMap m(5, fst_unit_pair_hash, snd_unit_pair_hash)
void imprime(DynDlist< int > &l)
Dynamic doubly linked list implementation.