Efficient Iterator for Permutations and Combinations

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'.


Build Status

Latest Documentation: http://randy3k.github.io/iterpc

Github: https://github.com/randy3k/iterpc

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.

Thank Martin Broadhurst and Alistair Israel for their algorithms. Alistair Israel has a very nice article on an algorithm to generate k-permutation.

Installation

If you want to install the latest development version, you can use devtools:

devtools::install_github("randy3k/iterpc")

or you can install the stable version via CRAN

install.packages("iterpc")

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("iterpc")

0.4.0 by Randy Lai, 2 months ago


https://randy3k.github.io/iterpc


Browse source code at https://github.com/cran/iterpc


Authors: Randy Lai [aut, cre]


Documentation:   PDF Manual  


GPL-2 license


Imports iterators, gmp, arrangements

Suggests foreach, testthat, knitr, rmarkdown


Imported by MendelianRandomization, ldamatch, robustrao, starmie.


See at CRAN