Percolation/Site percolation: Difference between revisions

Updated D entry
(Updated D entry)
(Updated D entry)
Line 288:
ref Xorshift rng) {
foreach (ref row; grid)
foreach (ref cell; row) {
immutable rcell = (rng.frontuniform01 /< double(rng.maxprobability); ?
rng Cell.popFrontempty : Cell.filled;
cell = (r < probability) ? Cell.empty : Cell.filled;
}
}