Package: RcppAlgos 2.10.0
RcppAlgos: High Performance Tools for Combinatorics and Computational Mathematics
Provides optimized functions and flexible iterators implemented in C++ for solving problems in combinatorics and computational mathematics. Handles various combinatorial objects including combinations, permutations, integer partitions and compositions, Cartesian products, unordered Cartesian products, and partition of groups. Utilizes the RMatrix class from 'RcppParallel' for thread safety. The combination and permutation functions contain constraint parameters that allow for generation of all results of a vector meeting specific criteria (e.g. finding all combinations such that the sum is between two bounds). Capable of ranking/unranking combinatorial objects efficiently (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.
Authors:
RcppAlgos_2.10.0.tar.gz
RcppAlgos_2.10.0.zip(r-4.7)RcppAlgos_2.10.0.zip(r-4.6)RcppAlgos_2.10.0.zip(r-4.5)
RcppAlgos_2.10.0.tgz(r-4.6-x86_64)RcppAlgos_2.10.0.tgz(r-4.6-arm64)RcppAlgos_2.10.0.tgz(r-4.5-x86_64)RcppAlgos_2.10.0.tgz(r-4.5-arm64)
RcppAlgos_2.10.0.tar.gz(r-4.7-arm64)RcppAlgos_2.10.0.tar.gz(r-4.7-x86_64)RcppAlgos_2.10.0.tar.gz(r-4.6-arm64)RcppAlgos_2.10.0.tar.gz(r-4.6-x86_64)
RcppAlgos_2.10.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
card.svg |card.png
RcppAlgos/json (API)
NEWS
| # Install 'RcppAlgos' in R: |
| install.packages('RcppAlgos', repos = c('https://jwood000.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/jwood000/rcppalgos/issues
Pkgdown/docs site:https://jwood000.github.io
combinationscombinatoricsfactorizationnumber-theoryparallelpermutationprime-factorizationsprimesievegmpcpp
Last updated from:9405564605. Checks:2 WARNING, 11 OK. Indexed: yes.
| Target | Result | Time | Files | Syslog |
|---|---|---|---|---|
| linux-devel-arm64 | WARNING | 361 | ||
| linux-devel-x86_64 | OK | 361 | ||
| source / vignettes | OK | 450 | ||
| linux-release-arm64 | WARNING | 351 | ||
| linux-release-x86_64 | OK | 391 | ||
| macos-release-arm64 | OK | 254 | ||
| macos-release-x86_64 | OK | 574 | ||
| macos-oldrel-arm64 | OK | 245 | ||
| macos-oldrel-x86_64 | OK | 585 | ||
| windows-devel | OK | 497 | ||
| windows-release | OK | 475 | ||
| windows-oldrel | OK | 458 | ||
| wasm-release | OK | 249 |
Exports:comboCountcomboGeneralcomboGridcomboGroupscomboGroupsCountcomboGroupsItercomboGroupsSamplecomboItercomboRankcomboSamplecompositionsCountcompositionsGeneralcompositionsItercompositionsRankcompositionsSampledivisorsRcppdivisorsSieveeulerPhiSieveexpandGridexpandGridCountexpandGridIterexpandGridSampleisPrimeRcppnumDivisorSievepartitionsCountpartitionsGeneralpartitionsIterpartitionsRankpartitionsSamplepermuteCountpermuteGeneralpermuteIterpermuteRankpermuteSampleprimeCountprimeFactorizeprimeFactorizeSieveprimeSievestdThreadMax
Attacking Problems Related to the Subset Sum Problem
Rendered fromSubsetSum.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-01-25
Cartesian Products and Partitions of Groups
Rendered fromOtherCombinatorics.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2022-03-15
Combination and Permutation Basics
Rendered fromGeneralCombinatorics.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-01-18
Combinatorial Iterators in RcppAlgos
Rendered fromCombinatoricsIterators.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-04-17
Combinatorial Sampling and Ranking
Rendered fromCombinatorialSampling.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-01-18
Computational Mathematics Overview
Rendered fromComputationalMathematics.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-01-18
Constraints in RcppAlgos: Constraint-Driven Combinatorial Enumeration
Rendered fromCombPermConstraints.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-01-20
High Performance Benchmarks
Rendered fromHighPerformanceBenchmarks.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2020-02-15
Integer Compositions in RcppAlgos
Rendered fromIntegerCompositions.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2026-03-07
Integer Partitions in RcppAlgos
Rendered fromIntegerPartitions.Rmdusingknitr::rmarkdownon May 22 2026.Last update: 2026-03-07
Started: 2026-03-07
Readme and manuals
Help Manual
| Help page | Topics |
|---|---|
| High Performance Tools for Combinatorics and Computational Mathematics | RcppAlgos-package RcppAlgos |
| S4-class for Exposing C++ Cartesian Class | $,Cartesian-method Cartesian-class |
| S4-classes for Exposing C++ Combinatorial Classes | $,Combo-method $,ComboApply-method $,ComboRes-method Combo-class ComboApply-class ComboRes-class |
| Number of combinations/permutations | comboCount comboCount.default comboCount.list comboCount.table permuteCount permuteCount.default permuteCount.list permuteCount.table |
| Generate Combinations and Permutations of a Vector with/without Constraints | comboGeneral comboGeneral.default comboGeneral.factor comboGeneral.integer comboGeneral.list comboGeneral.logical comboGeneral.numeric comboGeneral.table permuteGeneral permuteGeneral.default permuteGeneral.factor permuteGeneral.integer permuteGeneral.list permuteGeneral.logical permuteGeneral.numeric permuteGeneral.table |
| Unordered Cartesian Product | comboGrid |
| Partition a Vector into Groups | comboGroups |
| S4-class for Exposing C++ ComboGroups Class | $,ComboGroups-method ComboGroups-class |
| Number of Partitions of a Vector into Groups | comboGroupsCount |
| comboGroups Iterator | comboGroupsIter |
| Sample Partitions of a Vector into Groups | comboGroupsSample |
| Combination and Permutation Iterator | comboIter comboIter.default comboIter.factor comboIter.integer comboIter.list comboIter.logical comboIter.numeric comboIter.table permuteIter permuteIter.default permuteIter.factor permuteIter.integer permuteIter.list permuteIter.logical permuteIter.numeric permuteIter.table |
| Rank Combinations and Permutations | comboRank permuteRank |
| Sample Combinations and Permutations | comboSample comboSample.default comboSample.factor comboSample.integer comboSample.list comboSample.logical comboSample.numeric comboSample.table permuteSample permuteSample.default permuteSample.factor permuteSample.integer permuteSample.list permuteSample.logical permuteSample.numeric permuteSample.table |
| S4-class for Exposing C++ Constraints Class | $,Constraints-method Constraints-class |
| Vectorized Factorization (Complete) | divisorsRcpp |
| Generate Complete Factorization for Numbers in a Range | divisorsSieve |
| Apply Euler's Phi Function to Every Element in a Range | eulerPhiSieve |
| Cartesian Product | expandGrid |
| Count of the Cartesian Product | expandGridCount |
| expandGrid Iterator | expandGridIter |
| Sample the Cartesian Product | expandGridSample |
| Vectorized Primality Test | isPrimeRcpp |
| Apply Divisor Function to Every Element in a Range | numDivisorSieve |
| S4-class for Exposing C++ Partitions Class | $,Partitions-method Partitions-class |
| Number of Partitions/Compositions | compositionsCount compositionsCount.default compositionsCount.table partitionsCount partitionsCount.default partitionsCount.table |
| Generate Partitions/Compositions | compositionsGeneral compositionsGeneral.default compositionsGeneral.table partitionsGeneral partitionsGeneral.default partitionsGeneral.table |
| Partition/Composition Iterator | compositionsIter compositionsIter.default compositionsIter.table partitionsIter partitionsIter.default partitionsIter.table |
| Rank Partitions/Compositions | compositionsRank partitionsRank |
| Sample Partitions/Compositions | compositionsSample compositionsSample.default compositionsSample.table partitionsSample partitionsSample.default partitionsSample.table |
| Prime Counting Function pi(x) | primeCount |
| Vectorized Prime Factorization | primeFactorize |
| Generate Prime Factorization for Numbers in a Range | primeFactorizeSieve |
| Generate Prime Numbers | primeSieve |
| Max Number of Concurrent Threads | stdThreadMax |
