Closed
Description
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 Copy
able PRNGs?
Metadata
Metadata
Assignees
Labels
No labels