46 cout <<
"s = "; s.
for_each([] (
auto c) { cout << c <<
" "; });
56 row.for_each([] (
auto i) { cout << i <<
" "; });
62 aux.for_each([] (
const auto & row)
64 row.for_each([] (
auto i) { cout << i <<
" "; });
Combinatorics utilities: permutations, combinations and matrix transposition.
Dynamic singly linked list with functional programming support.
void for_each(Operation &operation)
Traverse all the container and performs an operation on each element.
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...
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.
DynList< DynList< T > > transpose(const DynList< DynList< T > > &l)
Transpose a matrix represented as a list of lists.
void in_place_transpose(C< C< T > > &l)
In-place transpose of a rectangular matrix stored as a nested container.