The basic RNGMgr framework is that there is some iterative process that may be started and stopped multiple times (e.g., start with iteration 1, stop after 100 iterations, restart at iteration 101 and stop at iteration 500, etc). The seed is saved each time the process is (re-)started, so the iterative process can be restarted from that point to regenerate the same RNG sequence if necessary.
To use this class, the user must minimally:
- rngmgr = RNGMgr(FileName) % Give the name of the file for storing RNG states
- Call rngmgr.Iteration at the start of the iteration loop.
- Call rngmgr.Save at the end of the iteration loop.
Jeff Miller (2019). RNGMgr (https://www.mathworks.com/matlabcentral/fileexchange/70259-rngmgr), MATLAB Central File Exchange. Retrieved .
Create scripts with code, output, and formatted text in a single executable document.