Provides optimized functions implemented in C++ with 'Rcpp' for solving problems in combinatorics and computational mathematics. There is a combination function and a permutation function that are both flexible as well as efficient with respect to speed and memory. There are optional constraint parameters that when utilized, generate all combinations/ permutations of a vector meeting specific criteria (e.g. finding all combinations such that the sum is less than a bound). Both functions are capable of handling multisets as well. Additionally, there are several highly efficient number theoretic functions that are useful for problems common in computational mathematics. These include various sieving functions that can quickly generate the following: prime numbers, number of coprime elements, number of divisors, prime factorizations, and complete factorizations. Some of these functions make use of the fast integer division library 'libdivide' by <http://ridiculousfish.com>. The primeSieve function is based on the segmented sieve of Eratosthenes implementation by Kim Walisch. It is capable of generating all primes less than a billion in just over 1 second. It can also quickly generate prime numbers over a range (e.g. primeSieve(10^13, 10^13+10^9)). There are stand-alone vectorized functions for general factoring (e.g. all divisors of number), primality testing, as well as prime factoring (this function implements a non-gmp variant of Pollard's rho algorithm). Finally, there is a prime counting function that implements a simple variation of Legendre's formula based off of the algorithm by Kim Walisch. It is capable of returning the number of primes below a trillion in under 0.5 seconds.

Version: | 1.0.1 |

Imports: | Rcpp (≥ 0.12.8) |

LinkingTo: | Rcpp |

Suggests: | testthat, gmp (≥ 0.5-1), numbers (≥ 0.6-6) |

Published: | 2018-03-10 |

Author: | Joseph Wood |

Maintainer: | Joseph Wood <jwood000 at gmail.com> |

BugReports: | https://github.com/jwood000/RcppAlgos/issues |

License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |

URL: | https://github.com/jwood000/RcppAlgos, https://gmplib.org/, http://primesieve.org/, https://github.com/kimwalisch/primesieve, https://github.com/kimwalisch/primecount, http://libdivide.com/ |

NeedsCompilation: | yes |

Materials: | README NEWS |

In views: | NumericalMathematics |

CRAN checks: | RcppAlgos results |

Reference manual: | RcppAlgos.pdf |

Package source: | RcppAlgos_1.0.1.tar.gz |

Windows binaries: | r-prerel: RcppAlgos_1.0.1.zip, r-release: RcppAlgos_1.0.1.zip, r-oldrel: RcppAlgos_1.0.1.zip |

OS X binaries: | r-prerel: RcppAlgos_1.0.1.tgz, r-release: RcppAlgos_1.0.1.tgz |

Old sources: | RcppAlgos archive |

Reverse suggests: | bigIntegerAlgos |

Please use the canonical form
`https://CRAN.R-project.org/package=RcppAlgos`
to link to this page.