JuliaMath / JuliaMath/Combinatorics.jl
integer_partitions should be deprecated in favour of partitions(n::Integer)
- Dominant language
- Julia
- Stars
- 230
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
`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 broken, the `partitions` case discussed in #79 :
```
julia> integer_partitions(0)
0-element Array{Array{Int64,1},1}
julia> partitions(0)|>collect
1-element Array{Array{Int64,1},1}:
#undef
```
but should return `[[]]`
For `n>0` the results of `integer_partitions` is sorted opposite to `partitions`:
```
julia> collect(partitions(3))
3-element Array{Array{Int64,1},1}:
[3]
[2, 1]
[1, 1, 1]
julia> integer_partitions(3)
3-element Array{Array{Int64,1},1}:
[1, 1, 1]
[2, 1]
[3]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.