Closed Darkhogg closed 6 years ago
I've been looking into it and I'm going to reply to myself:
No, there is no way to serialize a generator, but Yes, it can technically be done (for mt19937
at least): It's enough to store the seed used and a count of values (getUsedCount()
) so that you can seed().discard()
later and resume the random in the same position.
I'm closing this issue as that's enough for me.
Is there a way of storing the current state of the generator in a way that can be restored later? If not, can it be done?