High Performance Tools for Combinatorics and Computational Mathematics
Number of combinations/permutations
Generate Combinations and Permutations of a Vector with/without Constr...
Combination and Permutation Iterator
Rank Combinations and Permutations
Sample Combinations and Permutations
S4-classes for Exposing C++ Combinatorial Classes
Efficient Version of expand.grid
Where order Does Not Matter
S4-class for Exposing C++ ComboGroups Class
Partition a Vector into Groups
Number of Partitions of a Vector into Groups
comboGroups Iterator
Sample Partitions of a Vector into Groups
S4-class for Exposing C++ Constraints Class
Vectorized Factorization (Complete)
Generate Complete Factorization for Numbers in a Range
Apply Euler's Phi Function to Every Element in a Range
Vectorized Primality Test
Apply Divisor Function to Every Element in a Range
S4-class for Exposing C++ Partitions Class
Number of Partitions/Compositions
Generate Partitions/Compositions
Partition/Composition Iterator
Rank Partitions/Compositions
Sample Partitions/Compositions
Prime Counting Function
Vectorized Prime Factorization
Generate Prime Factorization for Numbers in a Range
Generate Prime Numbers
High Performance Tools for Combinatorics and Computational Mathematics
Max Number of Concurrent Threads
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.
Useful links