RcppAlgos

High Performance Tools for Combinatorics and Computational Mathematics

Provides optimized functions implemented in C++ with 'Rcpp' for solving problems in combinatorics and computational mathematics. There are combination/permutation functions that are both flexible as well as efficient with respect to speed and memory. Constraint parameters allow for generation of all combinations/permutations of a vector meeting specific criteria (e.g. finding all combinations such that the sum is less than a bound). Capable of generating specific combinations/permutations (e.g. retrieve only the nth lexicographical result) which sets up nicely for parallelization as well as random sampling. Gmp support permits exploration where the total number of results is large (e.g. comboSample(10000, 500, n = 4)). Additionally, there are several highly efficient number theoretic functions that are useful for problems common in computational mathematics. 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)). Finally, there is a prime counting function that implements a simple variations of Legendre's formula based on the algorithm by Kim Walisch.

Total

4,441

Last month

734

Last week

279

Average per day

24

Daily downloads

Total downloads

Description file content

Package
RcppAlgos
Version
2.2.0
Title
High Performance Tools for Combinatorics and Computational Mathematics
Description
Provides optimized functions implemented in C++ with 'Rcpp' for solving problems in combinatorics and computational mathematics. There are combination/permutation functions that are both flexible as well as efficient with respect to speed and memory. Constraint parameters allow for generation of all combinations/permutations of a vector meeting specific criteria (e.g. finding all combinations such that the sum is less than a bound). Capable of generating specific combinations/permutations (e.g. retrieve only the nth lexicographical result) which sets up nicely for parallelization as well as random sampling. Gmp support permits exploration where the total number of results is large (e.g. comboSample(10000, 500, n = 4)). Additionally, there are several highly efficient number theoretic functions that are useful for problems common in computational mathematics. Some of these functions make use of the fast integer division library 'libdivide' by . 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)). Finally, there is a prime counting function that implements a simple variations of Legendre's formula based on the algorithm by Kim Walisch.
URL
BugReports
https://github.com/jwood000/RcppAlgos/issues
Imports
gmp, Rcpp (>= 0.12.8)
LinkingTo
Rcpp
Suggests
testthat, numbers (>= 0.6-6), bigIntegerAlgos, microbenchmark
License
GPL (>= 2)
LazyData
TRUE
SystemRequirements
gmp (>= 4.2.3)
NeedsCompilation
yes
Author
Joseph Wood
Maintainer
Joseph Wood
Encoding
UTF-8
RoxygenNote
6.0.1
Packaged
2018-09-14 19:25:40 UTC; josephwood
Repository
CRAN
Date/Publication
2018-09-14 22:22:23 UTC

install.packages('RcppAlgos')

2.2.0

6 days ago

https://github.com/jwood000/RcppAlgos

Joseph Wood

GPL (>= 2)

Imports

gmp, Rcpp (>= 0.12.8)

Suggests

testthat, numbers (>= 0.6-6), bigIntegerAlgos, microbenchmark

Discussions