package combinat
Module CombinatSource
Internal iterators for combinatorial objects.
Iterator over the partitions of an integer n into k parts.
Iterator over the partitions of an integer n into k parts, including partitions where some elements are zero.
Iterator over the permutations of a set of n elements.
permutations ~n:3 = [0;1;2]; [0;2;1]; [1;0;2]; [1;2;0]; [2;0;1]; [2;1;0]
Iterator over the sequences of length k of a list of elements. Sequences are a superset of combinations that also consider every ordering.
Iterator over all sequences where the ith element of the sequence comes from the ith list.
Iterator over the combinations of size k a set of n elements.
combinations ~n:4 ~k:2 = [0;1]; [0;2]; [0;3]; [1;2]; [1;3]; [2;3]