Efficient Iterator for Permutations and Combinations
Get all permutations/combinations for a iterator
Get the current element of a iterator
Get the length for a iterator
Get the next permutation(s)/combination(s) for a iterator
Wrap iterpc objects by iterators::iter
Efficient Iterator for Permutations and Combinations
Calculate multinomial coefficient
Calculate the number of r-combinations of a multiset
Calculate the number of r-permutations of a multiset
Iterator for generating permutations and combinations. They can be either drawn with or without replacement, or with distinct/ non-distinct items (multiset). The generated sequences are in lexicographical order (dictionary order). The algorithms to generate permutations and combinations are memory efficient. These iterative algorithms enable users to process all sequences without putting all results in the memory at the same time. The algorithms are written in C/C++ for faster performance. Note: 'iterpc' is no longer being maintained. Users are recommended to switch to 'arrangements'.