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

Fix stirlings2 bug

Open o314 opened this issue 5 years ago • 2 comments

stirlings2 is implemented twice in this package.

stirlings2 is slow :

julia> @btime stirlings2_new(25,7)
  17.546 μs (431 allocations: 7.09 KiB)
227832482998716310

julia> @btime stirlings2(25,7)
  594.258 μs (0 allocations: 0 bytes)
227832482998716310

nfixedsetpartitions is bugged :

@test_broken nfixedsetpartitions(21, 13) >= 0
@test_broken nfixedsetpartitions(21, 14) >= 0
@test_broken nfixedsetpartitions(21, 15) >= 0
@test_broken nfixedsetpartitions(21, 16) >= 0
@test_broken nfixedsetpartitions(21, 17) >= 0
@test_throws OverflowError nfixedsetpartitions(21,21)

SEE

o314 avatar Apr 14 '20 01:04 o314

Codecov Report

Merging #92 into master will decrease coverage by 0.49%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
- Coverage   95.79%   95.29%   -0.50%     
==========================================
  Files           8        8              
  Lines         642      638       -4     
==========================================
- Hits          615      608       -7     
- Misses         27       30       +3     
Impacted Files Coverage Δ
src/numbers.jl 100.00% <100.00%> (ø)
src/partitions.jl 97.10% <100.00%> (-1.00%) :arrow_down:
src/combinations.jl 84.03% <0.00%> (-0.72%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9cd51fb...d4d32d9. Read the comment docs.

codecov-io avatar Apr 14 '20 01:04 codecov-io

There is also #126, let's compare those two.

mschauer avatar Nov 11 '22 10:11 mschauer