RcppAlgos: High Performance Tools for Combinatorics and Computational Mathematics

Provides optimized functions and flexible combinatorial iterators implemented in C++ for solving problems in combinatorics and computational mathematics. Utilizes the RMatrix class from 'RcppParallel' for thread safety. There are combination/permutation functions with constraint parameters that allow for generation of all results of a vector meeting specific criteria (e.g. generating integer partitions/compositions or finding all combinations such that the sum is between two bounds). 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 high performance 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'. The primeSieve function is based on the segmented sieve of Eratosthenes implementation by Kim Walisch. It is also efficient for large numbers by using the cache friendly improvements originally developed by Tomás Oliveira. Finally, there is a prime counting function that implements Legendre's formula based on the work of Kim Walisch.

Package details

AuthorJoseph Wood
MaintainerJoseph Wood <jwood000@gmail.com>
LicenseGPL (>= 2)
Version2.6.0
URL https://github.com/jwood000/RcppAlgos https://gmplib.org/ https://github.com/kimwalisch/primesieve http://libdivide.com https://github.com/kimwalisch/primecount http://ridiculousfish.com/ http://sweet.ua.pt/tos/software/prime_sieve.html
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("RcppAlgos")

Try the RcppAlgos package in your browser

Any scripts or data that you put into this service are public.

RcppAlgos documentation built on Aug. 15, 2022, 5:09 p.m.