Combinatorics.jl
Combinatorics.jl copied to clipboard
added `Base.eltype()` method for `MultiExponents`
collect called on MultiExponents is type-unstable because MultiExponents has no defined eltype. This PR adds a method for Base.eltype() so that collect returns a Vector{Vector{Int64}} rather than a Vector{Any}.
Before:
julia> collect(multiexponents(3, 2))
6-element Array{Any,1}:
[2, 0, 0]
[1, 1, 0]
[1, 0, 1]
[0, 2, 0]
[0, 1, 1]
[0, 0, 2]
After:
julia> collect(multiexponents(3, 2))
6-element Vector{Vector{Int64}}:
[2, 0, 0]
[1, 1, 0]
[1, 0, 1]
[0, 2, 0]
[0, 1, 1]
[0, 0, 2]
Codecov Report
Patch coverage: 100.00% and no project coverage change.
Comparison is base (
ac70c46) 96.97% compared to head (2ddfe36) 96.98%.
Additional details and impacted files
@@ Coverage Diff @@
## master #136 +/- ##
=======================================
Coverage 96.97% 96.98%
=======================================
Files 7 7
Lines 728 729 +1
=======================================
+ Hits 706 707 +1
Misses 22 22
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/multinomials.jl | 92.85% <100.00%> (+0.54%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.