RcppAlgos2.8.3 package

High Performance Tools for Combinatorics and Computational Mathematics

combinatoricsCount

Number of combinations/permutations

combinatoricsGeneral

Generate Combinations and Permutations of a Vector with/without Constr...

combinatoricsIterator

Combination and Permutation Iterator

combinatoricsRank

Rank Combinations and Permutations

combinatoricsSample

Sample Combinations and Permutations

Combo-Class

S4-classes for Exposing C++ Combinatorial Classes

comboGrid

Efficient Version of expand.grid Where order Does Not Matter

ComboGroups-Class

S4-class for Exposing C++ ComboGroups Class

comboGroups

Partition a Vector into Groups

comboGroupsCount

Number of Partitions of a Vector into Groups

comboGroupsIterator

comboGroups Iterator

comboGroupsSample

Sample Partitions of a Vector into Groups

Constraints-Class

S4-class for Exposing C++ Constraints Class

divisorsRcpp

Vectorized Factorization (Complete)

divisorsSieve

Generate Complete Factorization for Numbers in a Range

eulerPhiSieve

Apply Euler's Phi Function to Every Element in a Range

isPrimeRcpp

Vectorized Primality Test

numDivisorSieve

Apply Divisor Function to Every Element in a Range

Partitions-Class

S4-class for Exposing C++ Partitions Class

partitionsCount

Number of Partitions/Compositions

partitionsGeneral

Generate Partitions/Compositions

partitionsIterator

Partition/Composition Iterator

partitionsRank

Rank Partitions/Compositions

partitionsSample

Sample Partitions/Compositions

primeCount

Prime Counting Function π(x)\pi(x)

primeFactorize

Vectorized Prime Factorization

primeFactorizeSieve

Generate Prime Factorization for Numbers in a Range

primeSieve

Generate Prime Numbers

RcppAlgos-package

High Performance Tools for Combinatorics and Computational Mathematics

stdThreadMax

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.

  • Maintainer: Joseph Wood
  • License: GPL (>= 2)
  • Last published: 2023-12-10