# Combinatorial Functions

EqualitySampler.stirlings2Function
stirlings2(n::Integer, k::Integer) -> Any

Compute the Stirlings numbers of the second kind. The EqualitySampler.ExplicitStrategy (default) uses an explicit loop and is computationally more efficient but subject to overflow, so using BigInt is advised. The EqualitySampler.RecursiveStrategy uses recursion and is mathematically elegant yet inefficient for large values.

EqualitySampler.logstirlings2Function
logstirlings2(n::Integer, k::Integer) -> Any

Compute the logarithm of the Stirlings numbers of the second kind with an explicit formula.

EqualitySampler.stirlings2rFunction
stirlings2r(n::T, k::T, r::T) where T <: Integer
stirlings2r(n::T, k::T, r::T, ::Type{EqualitySampler.ExplicitStrategy})  where T <: Integer
stirlings2r(n::T, k::T, r::T, ::Type{EqualitySampler.RecursiveStrategy}) where T <: Integer

Compute the r-Stirlings numbers of the second kind. The EqualitySampler.ExplicitStrategy (default) uses an explicit loop and is computationally more efficient but subject to overflow, so using BigInt is advised. The EqualitySampler.RecursiveStrategy uses recursion and is mathematically elegant yet inefficient for large values.

EqualitySampler.logstirlings2rFunction
logstirlings2r(n::T, k::T, r::T) where T <: Integer

Computes the logarithm of the r-stirling numbers with an explicit formula.

EqualitySampler.unsignedstirlings1Function
unsignedstirlings1(n::Integer, k::Integer) -> Any

Compute the absolute value of the Stirlings numbers of the first kind. The EqualitySampler.ExplicitStrategy (default) uses an explicit loop and is computationally more efficient but subject to overflow, so using BigInt is advised. The EqualitySampler.RecursiveStrategy uses recursion and is mathematically elegant yet inefficient for large values.

EqualitySampler.logunsignedstirlings1Function
logunsignedstirlings1(n::Integer, k::Integer) -> Any

Compute the logarithm of the absolute value of the Stirlings numbers of the first kind.

EqualitySampler.PartitionSpaceType
struct PartitionSpace{T<:Integer, P<:EqualitySampler.AbstractPartitionSpace}
# constructor
PartitionSpace(k::T, ::Type{U} = EqualitySampler.DistinctPartitionSpace)

A type to represent the space of partitions. EqualitySampler.AbstractPartitionSpace indicates whether partitions should contains duplicates or be distinct. For example, the distinct iterator will return [1, 1, 2] but not [2, 2, 1] and [1, 1, 3], which are returned when P = EqualitySampler.DuplicatedPartitionSpace.