Skip to content

Commit

Permalink
Back out multinomial heuristic adjustment at @adienes's request
Browse files Browse the repository at this point in the history
  • Loading branch information
LilithHafner authored Apr 12, 2024
1 parent 1c3530c commit df932f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/samplers/multinomial.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function _rand!(rng::AbstractRNG, s::MultinomialSampler,
x::AbstractVector{<:Real})
n = s.n
k = length(s)
if k < n/50+2
if n^2 > k
multinom_rand!(rng, n, s.prob, x)
else
# Use an alias table
Expand Down

0 comments on commit df932f4

Please sign in to comment.