dSFMT state read/write routines

Short history

In October 2010 I was working in a research project where we minimize a segmentation energy for images using a stochastic approach. To this end, we choose the SIMD-oriented Fast Mersenne Twister (SFMT). This random number generator is described in this paper.

Mutsuo Saito and Makoto Matsumoto, "A PRNG Specialized in Double Precision Floating Point Number Using an Affine Transition", Monte Carlo and Quasi-Monte Carlo Methods 2008, Springer, 2009, pp. 589 -- 602. DOI:10.1007/978-3-642-04107-5_38

and the authors are so kind as to provide fully working C code, at the above address.

While we were developing our research, we also added some code to your library. This code can be used to transform the internal state of the dSFMT into a formatted ASCII string. This is quite useful for very long running minimization algorithms. When our minimization algorithm runs, every 10 seconds it saves this string in a "checkpoint file" together with all other internal parameters of the algorithm ; if the algorithm is interrupted, then the algorithm can be restarted and it will read the file and start from where it last saved its state. This is also very useful if the algorithm crashes: by loading the state, the debugging can be done on the state that (nearly) crashed. (This proved very useful when it happened that a particular choice of inputs would crash the algorithm after ~50minutes of running...).

New routines

The new code adds 4 functions; the first function transforms the state to a ASCII multiline string. The other functions read the string back to the state.

Various info.

Downloads

The following files are available for download