You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there’s a few random number generators that implement Copy:
StdRng
Isaac*Rng
ChaChaRng
All of these random number generators have a bad property of also copying their seed/internal data implicitly, rather than splitting their seed between original and copied generators. This means that Rng in question will start generating the same sequence values when generator is passed by value.
These generators should not implement Copy (implicit) and implement Clone (explicit) instead in case copying generators is intended (which is almost never a case), like XorShiftRng does. Maybe I just missed the use-case of Copyable PRNGs?