I have code that uses both RandomReal and RandomInteger a number of times to produces a sequence of $n$ data sets. After closing the notebook and quitting the kernel, I would like to be able to start the code where I left off in the random sequence, and generate an additional $m$ data sets.
I can do this with the old Random function and $RandomState. But, how do I do it with RandomReal and RandomInteger?
Random`GetRandomStateandRandom`SetRandomState. These are undocumented and might crash your kernel. I did get a crash with them yesterday. Related: http://mathematica.stackexchange.com/questions/91523/why-doest-seedrandom-work-here – Szabolcs Aug 14 '15 at 12:20RandomInteger[]&/@Range[10^7]//Timing//First -> .55– george2079 Aug 14 '15 at 15:53RandomInteger[{0, 1}, 10^7]which is an order of magnitude faster and leaves the randomizer at the same state as yours. – István Zachar Jul 13 '16 at 15:40