4 lines
181 B
MiniZinc
4 lines
181 B
MiniZinc
predicate uniform_neighbourhood(array[int] of var int: x, float: destrRate) =
|
|
forall(i in index_set(x))
|
|
(if uniform(0.0,1.0) > destrRate then x[i] = sol(x[i]) else true endif);
|