Package: RcppAlgos 2.8.5
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.
Authors:
RcppAlgos_2.8.5.tar.gz
RcppAlgos_2.8.5.zip(r-4.5)RcppAlgos_2.8.5.zip(r-4.4)RcppAlgos_2.8.5.zip(r-4.3)
RcppAlgos_2.8.5.tgz(r-4.4-x86_64)RcppAlgos_2.8.5.tgz(r-4.4-arm64)RcppAlgos_2.8.5.tgz(r-4.3-x86_64)RcppAlgos_2.8.5.tgz(r-4.3-arm64)
RcppAlgos_2.8.5.tar.gz(r-4.5-noble)RcppAlgos_2.8.5.tar.gz(r-4.4-noble)
RcppAlgos_2.8.5.tgz(r-4.4-emscripten)RcppAlgos_2.8.5.tgz(r-4.3-emscripten)
RcppAlgos.pdf |RcppAlgos.html✨
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
combinationscombinatoricsfactorizationnumber-theoryparallelpermutationprime-factorizationsprimesieve
Last updated 26 days agofrom:73055ad6ec. Checks:OK: 9. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 11 2024 |
R-4.5-win-x86_64 | OK | Oct 11 2024 |
R-4.5-linux-x86_64 | OK | Oct 11 2024 |
R-4.4-win-x86_64 | OK | Oct 11 2024 |
R-4.4-mac-x86_64 | OK | Oct 11 2024 |
R-4.4-mac-aarch64 | OK | Oct 11 2024 |
R-4.3-win-x86_64 | OK | Oct 11 2024 |
R-4.3-mac-x86_64 | OK | Oct 11 2024 |
R-4.3-mac-aarch64 | OK | Oct 11 2024 |
Exports:comboCountcomboGeneralcomboGridcomboGroupscomboGroupsCountcomboGroupsItercomboGroupsSamplecomboItercomboRankcomboSamplecompositionsCountcompositionsGeneralcompositionsItercompositionsRankcompositionsSampledivisorsRcppdivisorsSieveeulerPhiSieveisPrimeRcppnumDivisorSievepartitionsCountpartitionsGeneralpartitionsIterpartitionsRankpartitionsSamplepermuteCountpermuteGeneralpermuteIterpermuteRankpermuteSampleprimeCountprimeFactorizeprimeFactorizeSieveprimeSievestdThreadMax
Attacking Problems Related to the Subset Sum Problem
Rendered fromSubsetSum.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-01-25
Cartesian Products and Partitions of Groups
Rendered fromOtherCombinatorics.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2022-03-15
Combination and Permutation Basics
Rendered fromGeneralCombinatorics.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-01-18
Combinatorial Iterators in RcppAlgos
Rendered fromCombinatoricsIterators.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-04-17
Combinatorial Sampling and Ranking
Rendered fromCombinatorialSampling.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-01-18
Computational Mathematics Overview
Rendered fromComputationalMathematics.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-01-18
Constraints, Partitions, and Compositions
Rendered fromCombPermConstraints.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-01-20
High Performance Benchmarks
Rendered fromHighPerformanceBenchmarks.Rmd
usingknitr::rmarkdown
on Oct 11 2024.Last update: 2023-12-01
Started: 2020-02-15
Readme and manuals
Help Manual
Help page | Topics |
---|---|
High Performance Tools for Combinatorics and Computational Mathematics | RcppAlgos-package RcppAlgos |
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 |
Efficient Version of 'expand.grid' Where order Does Not Matter | 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 |
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 |