let next_step prng update_rate transition_rule configuration_in configuration_out =
assert (Array.length configuration_in = Array.length configuration_out);
(* assert (Array.length neighbourhoods = Array.length configuration_out); *)
assert (0. <= update_rate && update_rate <= 1.);
(* Array.iteri *)
(* (fun i neighb -> *)
(* if Random.State.float prng 1. < update_rate *)
(* then configuration_out.(i) <- transition_rule configuration_in neighb *)
(* else configuration_out.(i) <- configuration_in.(i)) *)
(* neighbourhoods *)
for i=0 to pred (Array.length configuration_in) do
if Femtolib.Random2.float_lp prng < update_rate
then configuration_out.(i) <- transition_rule configuration_in i
else configuration_out.(i) <- configuration_in.(i)
done;