This allocates an array [i,j]
on every iteration. Better to use a tuple (i,j) .+ rand(neighborhood)
.
I would usually recommend employing ghost cells to avoid these kinds of boundary checks in inner loops.
This allocates an array [i,j]
on every iteration. Better to use a tuple (i,j) .+ rand(neighborhood)
.
I would usually recommend employing ghost cells to avoid these kinds of boundary checks in inner loops.