Percolation/Mean cluster density: Difference between revisions
Content added Content deleted
(Add Factor example) |
|||
Line 676: | Line 676: | ||
=={{header|Julia}}== |
=={{header|Julia}}== |
||
{{works with|Julia|0.6}} |
|||
{{trans|Python}} |
{{trans|Python}} |
||
<lang julia>using Distributions |
<lang julia>using Printf, Distributions |
||
newgrid(p::Float64, r::Int, c::Int=r) = rand(Bernoulli(p), r, c) |
newgrid(p::Float64, r::Int, c::Int=r) = rand(Bernoulli(p), r, c) |