A collection of iterators for generating permutations and combinations with or without replacement; with distinct items or 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 performances.
|Author||Randy Lai [aut, cre], Martin Broadhurst [aut]|
|Date of publication||2016-05-31 07:49:57|
|Maintainer||Randy Lai <email@example.com>|
getall: Get all permutations/combinations for a iterator
getcurrent: Get the current element of a iterator
getlength: Get the length for a iterator
getnext: Get the next permutation(s)/combination(s) for a iterator
iterpc: Iterator for Permutations and Combinations
iter_wrapper: Wrap iterpc objects by iterators::iter
multichoose: Calculate multinomial coefficient
nc_multiset: Calculate the number of r-combinations of a multiset
np_multiset: Calculate the number of r-permutations of a multiset
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.