Combinatorics.jl icon indicating copy to clipboard operation
Combinatorics.jl copied to clipboard

A combinatorics library for Julia

Results 72 Combinatorics.jl issues
Sort by recently updated
recently updated
newest added

I was looking for a Julia implementation of this known combinatorics problem: [Stars and bars](https://en.wikipedia.org/wiki/Stars_and_bars_%28combinatorics%29) I have some struggle to use `multiset_combinations` and `multiset_permutations` and I didn't find any good...

The documentation for stirlings1 and stirlings2 indicates that they can use BigInts if provided with such as argument. However the existing functions specify n and k arguments to be Int....

Currently ``` julia> partitions(0)|>collect 1-element Array{Any,1}: #undef ``` This is unexpected because the [partition of the empty set is the empty set](https://en.wikipedia.org/wiki/Partition_of_a_set#Examples) so I would expect ``` patitions(0)|>collect == [[]]...

`integer_partitions(n)` should be deprecated in favour of `partitions(n::Integer)`. Additionally, `partitions` is not documented in the readme. These functions currently do not behave the same: In the 0 case, both are...

`partitions(-1)` should produce an error when it is constructed: ``` # error here julia> partitions(-1) Combinatorics.IntegerPartitions(-1) julia> partitions(-1)|>collect ERROR: ArgumentError: destination has fewer elements than required Stacktrace: [1] copyto!(::Array{Any,1}, ::Combinatorics.IntegerPartitions)...

While working on my own code for YoungDiagrams I encountered this: ```julia λ = [5,3,2,2,1] μ = [2,2,1] m, n = length(λ), length(μ) l = maximum(λ) youngdiagram=zeros(Int, m, l) for...

bug

The function `character(l, m)` gives wrong results, e.g. the dimensions of representations (i.e. values at `[1,1,...,1]`): ```julia N = 4 for λ in partitions(N) println("λ = $(rpad(λ,10))\t χ_λ($(ones(Int,N))) = ",...

bug

This is a julia port of the sage VectorPartitions function originally written by Amritanshu Prasad (2013). A vector partition of "vector" is a list of vectors with non-negative integer entries...

Please take a look at the functionality in QuantEcon.jl. We are trying to make the package thinner and want to find a good place to port out code. A lot...