                       Changes in version 2.10.2                        

New Features

    o   Added exact dynamic-programming counting for multiset
	partitions and compositions, including weak compositions and
	non-weak compositions with zero padding. Large counts use
	GMP-backed bigz arithmetic where needed.

Bug Fixes

    o   Fixed overflow in large multiset permutation counts. For
	example, permuteCount(2, 2000, freqs = c(1000, 1000)) now
	returns the correct bigz result (Issue #72, PR #74).

    o   Fixed FUN being ignored for factor inputs in comboGeneral() and
	permuteGeneral(). Factors passed to FUN retain their levels and
	class, including ordered-factor status (Issue #71, PR #75).

Improvements

    o   Updated partition_type labels returned by design functions to
	use clearer names, such as DistinctNoZero and CompRepZero.
	Multiset composition designs now distinguish weak and
	zero-padded cases.

    o   Multiset partition generation now validates upper against the
	computed result count.

    o   Improved errors for unsupported partition and composition
	ranking or sampling, and for cases with no solution.

    o   Clarified threading restrictions for special constraints and
	documented calling startOver() before reusing an iterator after
	a generation error.

Performance

    o   Replaced enumeration-based multiset partition and composition
	counting with dynamic programming.

    o   Improved GMP-backed multiset counting with specialized
	partition and composition implementations that reduce
	intermediate allocation and arbitrary-precision arithmetic
	overhead.

    o   Reduced intermediate allocation and copying when generating
	multiset partitions and sum-constrained multiset permutations.

                 Changes in version 2.10.1 (2026-06-08)                 

Bug Fixes

    o   Fixed compositionsCount() for multiset inputs using both freqs
	and target when zero is not included in the input.

Improvements

    o   Improved startup-time core detection by removing
	platform-specific shell-command fallbacks and using safer
	fallbacks when physical core information is unavailable.

    o   Simplified repeated-composition successor logic by replacing a
	suffix reversal with direct assignment of the affected entries.

Other

    o   Added linux-arm64 continuous-integration coverage.

                 Changes in version 2.10.0 (2026-03-08)                 

New Features

    o   Added parallel capabilities to all ranking functions via the
	new nThreads argument (e.g. comboRank(), partitionsRank(),
	compositionsRank()), enabling faster ranking of large
	combinatorial results.

    o   Implemented a next-lexicographical algorithm for generating
	distinct integer compositions, enabling efficient generation of
	large problems such as compositionsGeneral(50, 8).

    o   Added full support for distinct compositions across the
	compositional framework, including compositionsGeneral(),
	compositionsSample(), compositionsRank(), and
	compositionsIter().

    o   Added support for compositions with repetition subject to a
	maximum part constraint ("capped compositions"), including weak
	and non-weak cases, with full support for counting, ranking,
	sampling, and iteration.

    o   Enhanced permuteCount() to count permutations of partitions
	when called with constraintFun = "sum" and comparisonFun =
	"==", enabling faster counting when problems reduce to
	partition/composition counting.

Improvements

    o   Added validation at package load time to ensure the loaded
	shared library matches the installed package version, producing
	a clear error message instead of potential crashes caused by
	stale compiled code.

    o   Improved handling of certain constrained and ranking cases
	involving singleton inputs.

    o   Added internal tooling to support partition and composition
	counting workflows.

Performance

    o   Improved performance of ranking and generation algorithms,
	including support for parallel ranking.

    o   Improved performance and scalability of composition-related
	algorithms, particularly for constrained and distinct
	composition problems.

Bug Fixes

    o   Fixed an issue in permuteIter() affecting cases that reduce to
	permutations of partitions, which could previously produce
	incorrect iteration results.

    o   Improved input validation for constraint-based calls, producing
	clearer error messages for invalid inputs.

    o   Fixed edge-case issues affecting certain partition and
	composition iteration scenarios.

                 Changes in version 2.9.5 (2026-01-29)                  

Other

    o   Fixed CITATION metadata so it can be read during CRAN incoming
	checks.

    o   Corrected a malformed GitHub issue URL and updated
	redirected/broken links.

                        Changes in version 2.9.4                        

Other

    o   Replaced non-API use of ATTRIB in C++ internals to satisfy CRAN
	checks.

    o   Improved handling and diagnostics for classed raw-vector inputs
	(e.g. bigz/mpfr).

    o   Refreshed documentation URLs to current canonical links.

                 Changes in version 2.9.3 (2025-02-03)                  

Other

    o   Corrected spelling in DESCRIPTION

                        Changes in version 2.9.2                        

Bug Fixes

    o   Fixed clang-ASAN issue arising from calling vector::front on
	empty container.

                 Changes in version 2.9.1 (2025-01-27)                  

Other

    o   Fixed urls

                        Changes in version 2.9.0                        

New Features

    o   Added Cartesian product functions: expandGridCount, expandGrid,
	expandGridSample, and expandGridIter.

Bug Fixes

    o   Fixed issue in comboGroup when groups of size 1 are passed. See
	Issue #53.

                 Changes in version 2.8.5 (2024-10-11)                  

Other

    o   Updated Author field and removed Maintainer field in
	DESCRIPTION file per W.R.E.

Bug Fixes

    o   Fixed LLVM-19 error occurring in libdivide header. See PR #113

                        Changes in version 2.8.4                        

New Features

    o   Can now pass integer convertible results to the sample
	functions for the n parameter.

    o   Added ... to allow for passing additional arguments to FUN. For
	example: comboGeneral(letters, 3, FUN = paste, collapse = ",
	").

Bug Fixes

    o   Fixed bug with iterator when multithreading and exhausting the
	iterator.

    o   Enforced values being converted to a primitive to be of length
	1.

    o   Fixed clang19 error in libdivide.

                 Changes in version 2.8.3 (2023-12-10)                  

New Features

    o   Now the combination and permutation functions are more flexible
	with S3 methods.

    o   Added ... to allow for passing additional arguments to FUN. For
	example: comboGeneral(letters, 3, FUN = paste, collapse = ",
	").

Bug Fixes

    o   Added explicit type conversion to Rprintf.

                 Changes in version 2.8.2 (2023-10-02)                  

New Features

    o   We have added comboGroupsIter. This a flexible iterator for
	iterating over partitions of groups. Offers random access, the
	ability to retrieve the next group or the next n groups at a
	time while keeping memory low.

                 Changes in version 2.8.1 (2023-08-14)                  

Bug Fixes

    o   Fixed integer overflow bug when converting vector size to
	number of rows in a matrix. See Issue #45.

    o   Fixed constraint permutation iterator. Before this fix, if a
	user requested a certain number of results such that the
	std::next_permutation algorithm was not exhausted, the next
	iteration requested would be nonsensical.

                 Changes in version 2.8.0 (2023-07-10)                  

New Features

    o   comboGroups can now handle groups of different sizes.

                 Changes in version 2.7.2 (2023-02-11)                  

Other

    o   Using a copy of gmpxx.h source in order to easily build on all
	platforms.

                 Changes in version 2.7.1 (2023-02-06)                  

Other

    o   Updated default C++ specification.

                        Changes in version 2.7.0                        

Other

    o   Now using gmpxx.h instead of gmp.h.

                 Changes in version 2.6.0 (2022-08-15)                  

New Features

    o   Added integer composition functions: compositionsCount,
	compositionsGeneral, compositionsSample, compositionsIter, and
	compositionsRank.

                        Changes in version 2.5.5                        

New Features

    o   Added ranking functions: comboRank, permuteRank, and
	partitionsRank

    o   Added back the ability to interrupt general constraint problems
	via cpp11::check_user_interrupt().

Other

    o   Corrected if() conditions comparing class() to string. Changed
	to is.character.

Bug Fixes

    o   Now checking class of input vector for partition functions.

    o   Now when partitionsCount returns 0, the number of results is
	zero. Before, we were checking for the count of partitions to
	be greater than zero, otherwise we would use the standard
	combinatorial counting functions to determine the number of
	results. This lead to strange results with elements not present
	in the original vector.

    o   For partitionsSample, in cases when we would rely on generating
	the partitions one at a time until there are no more (e.g. with
	partitionsGeneral), the number of partitions isn't calculated.
	This leads to the error: "n exceeds the maximum number of
	possible results". This is now fixed.

                        Changes in version 2.5.4                        

Other

    o   Added missing includes

                 Changes in version 2.5.3 (2022-03-31)                  

Other

    o   Fixed urls

                        Changes in version 2.5.2                        

Bug Fixes

    o   Fixed valgrind memory issue with package cpp11. Now using
	cpp11::stop instead of Rf_error so as to avoid longjmp (the
	root cause of the memory issues).

                        Changes in version 2.5.1                        

Bug Fixes

    o   Fixed memory issue when the number of results under contraint
	is less than the requested number.

                 Changes in version 2.5.0 (2022-03-16)                  

New Features

    o   Added partition specific functions: partionsGeneral,
	partitionsCount, partitionsIter, and partitionsSample

    o   comboIter and permuteIter now work with constraints.

    o   Dropped Rcpp and RcppThread as a dependency to reduce compile
	time and binary size. As a result, there is no longer the
	ability to interrupt long running processes. Will investigate
	in next release.

    o   We have added the parameter FUN.VALUE to comboGeneral and
	permuteGeneral. It acts as a template for the return value of
	FUN. The implementation is modeled after vapply.

Enhancements

    o   Improved underlying algorithm for comboGrid to be more memory
	efficient.

    o   Made minor changes to make data types more consistent in
	primeCount and primeSieve.

Bug Fixes

    o   When permuteGeneral is used with multisets and the width is
	maximized, multithreading would fail. This is fixed in 2.5.0.

    o   Fixed bug in retreiving the nth result in comboGroup and
	comboGroupSample when the number of results was greater than
	2^31 - 1 and less than 2^53 - 1. _E.g._ comboGroupsSample(27,
	9, seed = 4, sampleVec = 1606990240475839) gives incorrect
	results in the 5th group in prior versions. Now fixed!.

Other

    o   In this version we no longer output lexicographical
	composititions in very special circumstances outlined in older
	documentation using permuteGeneral. This was done for
	consistency as we felt that the output diverged too much from
	the general constrained output of permuteGeneral (See Output
	Order with permuteGeneral). Research is in the initial stage
	that is focused on implementing a new family of functions
	similar to the partition family of functions, but for
	compositions.

                 Changes in version 2.4.3 (2021-05-30)                  

Other

    o   Fixed urls

                        Changes in version 2.4.2                        

New Features

    o   Added function comboGrid for efficiently generating the
	Cartesian product where order does not matter.

Enhancements

    o   Refactored code base to reduce binary size

Other

    o   Removed LazyData from DESCRIPTION. Also added rmarkdown to
	Suggests.

                 Changes in version 2.4.1 (2020-03-24)                  

Other

    o   Fixed urls

                        Changes in version 2.4.0                        

New Features

    o   Added comboIter and permuteIter. These functions return
	iterators for iterating over combinations and permutations.
	They have a similar interface to comboGeneral and
	permuteGeneral and currently only work with standard
	combinations and permutations. They do not yet work with
	constraints (This will be the focus of the next release).

    o   Added "High Performance Benchmarks" and "Combinatorial
	Iterators in RcppAlgos" vignettes

Enhancements

    o   Now able to interrupt general constraint problems

Bug Fixes

    o   In 2.3.5 and 2.3.6, we mistakingly allowed a constraintFun to
	be applied to a logical vector which was crashing R. We have
	corrected this in 2.4.0+.

    o   Changed the data type for sizing the index matrix in
	permuteGeneral. Originally, we were using int and when the
	output was large enough, it was causing an integer overflow
	thus causing the index matrix to be improperly sized. We have
	since changed the data type to the recommended std::size_t.

                 Changes in version 2.3.6 (2020-01-29)                  

Bug Fixes

    o   Fixed bug associated with integer vectors, multisets, and
	constraints. See Issue #12 for more information.

                 Changes in version 2.3.5 (2020-01-26)                  

New Features

    o   Added comboGroups, comboGroupsCount, and comboGroupsSample.
	These functions deal with partitioning a vector/set into groups
	of equal size. See Create Combinations in R by Groups. See the
	related integer sequences A025035-A025042 at OEIS (E.g. A025036
	for Number of partitions of 1, 2, ..., 4n into sets of size 4.)

    o   Added vignettes (First version with vignettes)

    o   Added website via the excellent package pkgdown

    o   Now using C++11 instead of C++14. See Issue #10 for more
	information.

Enhancements

    o   Extended general partitions algorithm to multisets. E.g.
	comboGeneral(10, 8, freqs = rep(1:5, 2), constraintFun = "sum",
	comparisonFun = "==", limitConstraints = 55)

    o   Improved constraint algorithm for the general case.

    o   Added support for complex and raw types for all combinatorial
	functions.

    o   Improved permutation algorithm for all cases (I.e. no rep, with
	rep, and with multisets).

    o   Added loop unrolling to prime sieve algorithm for improved
	efficiency.

Bug Fixes

    o   Corrected checks for total number of partitions and assignment
	of number of rows when upper is applied in
	{combo|permute}General. See Issue #9 for more information.

    o   permuteGeneral no longer alters source vector. See Issue #11
	for more information.

                 Changes in version 2.3.4 (2019-07-03)                  

    o   Fixed clang/gcc-ASAN and valgrind issues in 2.3.3. These issues
	were arising from finding the first vector to meet the criteria
	in PartitionRep/Distinct. We also found further issues in the
	standard functions when the length of the partition was 2. The
	algorithm would eventually try and access an element of a
	vector at index -1. These fixes were confirmed by successful
	Rdevel CMD check under 'r-devel-ubsan-clang' via docker using
	the advice found here:
	https://knausb.github.io/2017/06/reproducing-a-clang-ubsan-issue/
	and http://dirk.eddelbuettel.com/code/sanitizers.html.

                 Changes in version 2.3.3 (2019-06-30)                  

    o   Fixed clang-UBSAN issue in 2.3.2. It was caused by populating a
	vector of ints with values larger than 2^31 - 1.

    o   Added optimized algorithm to {combo|permute}General when
	constraintFun = "sum", comparisonFun = "==", and the vector
	passed has a special form. This problem is a special case of
	the subset sum problem.

    o   Using std::vector and push_back member function instead of
	pre-allocating matrix when constraint is applied in
	{combo|permute}General. This alleviates the need to guess the
	upper limit and subsequently subset as only elements that meet
	the constraints are added.

    o   Fixed error in PollardRho.cpp when number passed had factors
	close to the limit in the predefined lookup table (i.e.
	constexpr int64_t FirstOmittedPrime = 3989)

                 Changes in version 2.3.2 (2019-04-14)                  

    o   Fixed clang-UBSAN issue in 2.3.1. It was caused by casting
	extremely large values to int64_t.

    o   Corrected handling of small values in PrimeSieveBig.

                 Changes in version 2.3.1 (2019-03-21)                  

    o   Explicitly casted to double for sqrt to silence Solaris

    o   Corrected handling of NaNs

                 Changes in version 2.3.0 (2019-03-17)                  

    o   All functions now have parallel capabilites via RcppThread.

    o   Utilizes RMatrix.h from RcppParallel for thread safe matrix
	class.

    o   Major overhaul of primeSieve for large primes.

    o   Added stdThreadMax for obtaining the number of threads
	available on a machine

                 Changes in version 2.2.0 (2018-09-14)                  

    o   Disabled Parallel argument as it was causing unpredictable
	errors on certain platforms. Research is ongoing to correct
	this for use in future versions. The development version will
	retain this feature.

    o   Corrected UBSAN error that caused by filling a vector of
	integers with numbers larger than 2^31 - 1.

                 Changes in version 2.1.0 (2018-09-11)                  

    o   Added argument Parallel to general and sampling functions for
	increased gains in efficiency.
	
	  • comboGeneral(30, 10, Parallel = TRUE)
	
	  • permuteGeneral(12, 7, TRUE, constraintFun = "sum", Parallel
	    = TRUE)

    o   Logical class is now preserved in combinatorial functions

    o   Added gmp support to combinatorial functions. Now, one can
	accurately and quickly work with combinations/permutations of
	large vectors. _E.g._:
	
	  • comboSample(runif(10000), 100, n = 10, seed = 42, Parallel
	    = TRUE)
	
	  • permuteGeneral(factor(state.name), 20, lower = 1e15, upper
	    = 1e15 + 1000)

    o   Added FUN argument to all combinatorial functions. Allows user
	to pass custom functions to be applied to
	combinations/permutations.

                 Changes in version 2.0.3 (2018-06-30)                  

    o   Corrected clang UBSAN error identified by two different unit
	tests. In both situations, the problem was occurring as a
	result of populating a vector of integers with values from a
	vector of doubles that contained a nan (Not-a-Number). Most
	information was obtained from Brian J. Knaus's blog titled :
	"Reproducing a clang-UBSAN issue"
	(https://knausb.github.io/2017/06/reproducing-a-clang-ubsan-issue/)

                 Changes in version 2.0.2 (2018-06-14)                  

    o   Corrected divide by zero in divisorsRcpp unit test.

                 Changes in version 2.0.1 (2018-06-10)                  

    o   Corrected spelling in DESCRIPTION

                        Changes in version 2.0.0                        

    o   Changed max value and explicitly casted a few values to
	(int64_t) in PollardRho.cpp for efficiency while still
	maintaining accuracy from 2^60 to 2^62 (isPrimeRcpp is roughly
	10% faster now).

    o   Updated core permutation algorithm for greater efficiency and
	generality

    o   Added capability of generating specific
	combinations/permutations

    o   Changed arguments to comboGeneral/permuteGeneral. rowCap is now
	upper.

    o   Added comboSample, permuteSample, comboCount, and permuteCount

    o   Fixed bug with numDivisorSieve and divisorSieve when the lower
	bound was greater than 1 and less than the sqrt of the upper
	bound. In the previous version, the numbers in this range would
	have duplicated values/counts.

    o   Increased efficiency of numDivisorSieve by a factor of 2.

    o   Updated unit tests for greater coverage. See the function
	package_coverage from the package 'covr'.

                 Changes in version 1.0.1 (2018-03-10)                  

    o   Corrected precision limits in documentation from 2^64 to 2^63.

    o   Changed const type in PollardRho.cpp from (int64_t) to (double)
	to correct "UndefinedBehaviorSanitizer"

    o   Changed examples in primeFactorizeSieve to reduce check time

    o   Added RcppAlgos-package man file.

                 Changes in version 1.0.0 (2018-03-07)                  

    o   Added the following functions: primeFactorize (vectorized
	pollard rho factorization), divisorsRcpp (vectorized factoring
	(complete)), isPrimeRcpp (vectorized primality testing using
	Miller-Rabin algorithm), & primeCount (based on the primecount
	algorithm by Kim Walisch)

    o   Completely revamped the primeSieve function. It is now a
	segmented sieve of Eratosthenes with wheel factorization based
	on primesieve by Kim Walisch.

    o   Renamed divisorsList to divisorsSieve (reason for the major
	version update to 1.0.0)

    o   Renamed primeFactorizationList to primeFactorizeSieve

    o   Made the sieving functions more flexible. They are now able to
	generate results over a range and can also produce named
	objects.

    o   All number theoretic functions have been made more efficient.
	Some make use of the fast integer division library 'libdivide'
	by ridiculousfish.

                 Changes in version 0.2.5 (2018-01-04)                  

    o   Added unit tests.

    o   Removed unnecessary files.

    o   Fixed bug in primeSieve that occurred when a number with a
	decimal was passed (e.g. 2.01).

    o   Adjusted accepted lower bound for numDivisorSieve,
	eulerPhiSieve, divisorsList, primeSieve, and
	primeFactorizationList.

    o   Fixed bug when non-unique elements are present with factors.

                 Changes in version 0.2.4 (2017-12-18)                  

    o   Fixed bug that occurs when non-unique elements are present for
	combinations with replacement.

                        Changes in version 0.2.3                        

    o   Fixed segmentation fault error highlighted by valgrind check in
	version 0.2.2.

    o   Updated DESCRIPTION file.

                 Changes in version 0.2.2 (2017-12-15)                  

    o   Fixed bug in constraint functions that occurred when m = 1 and
	the constraint limit was equal to the last element in v. It was
	returning a 2x1 matrix with the same value twice.  It is now
	correctly returning a 1x1 matrix with the correct value 1 time.

    o   Reorganized source code such that all utility functions for the
	combinatoric functions are now in their own file. Additionally
	added header for this file.

    o   All combinatoric functions can now utilize the rowCap argument.
	Before, rowCap only applied to the combinatorial functions with
	constraints.

    o   comboGeneral can now find all combinations of multisets.

    o   Both comboGeneral and permuteGeneral can utilize the argument m
	when dealing with multisets.  Before, permuteGeneral would
	simply return all permutations of a multiset. Now you can
	specify the lengths of the output.

                 Changes in version 0.2.1 (2017-11-29)                  

    o   Fixed bug that would occur in two edge cases involving the
	constraint functions.

    o   Slightly modified formatting for primeSieve.Rd

                 Changes in version 0.2.0 (2017-11-28)                  

    o   Updated combination algorithms. They are now more than twice as
	fast.

    o   Updated constraint functions so that memory access is always
	within container bounds

    o   Consolidated redundant code for outputting different Rcpp types
	(e.g. IntegerMatrix, CharacterMatrix, etc.) via a templated
	approach.

    o   Added the function permuteGeneral that is analogous to
	comboGeneral only instead of combinations, it gives all
	permutations. It has an additional argument (i.e. 'freqs') that
	is used to generate permutations of multisets.

    o   All combinatoric functions now support factor types.

                 Changes in version 0.1.2 (2017-11-03)                  

    o   Corrected minor typo in README file.

    o   Fixed minor error regarding explicitly comparing variables to
	large numbers that are typed out. Simply adding a decimal along
	with a zero remedies the situation.

                 Changes in version 0.1.1 (2017-11-03)                  

    o   Improved ComboConstraint function by removing unnecessary
	subsetting.

    o   Improved PrimeSieve internal C++ algorithm.

    o   Corrected the errors with respect to the math functions in C++.
	Explicitly overloaded the parameters of these functions by
	casting them to the double type.

                 Changes in version 0.1.0 (2017-10-26)                  

    o   Initial Release
