Next: Random number generator algorithms, Previous: Copying random number generator state, Up: Random Number Generation
The library provides functions for reading and writing the random number state to a file as binary data.
This function writes the random number state of the random number generator r to the stream stream in binary format. The return value is 0 for success and
GSL_EFAILED
if there was a problem writing to the file. Since the data is written in the native binary format it may not be portable between different architectures.
This function reads the random number state into the random number generator r from the open stream stream in binary format. The random number generator r must be preinitialized with the correct random number generator type since type information is not saved. The return value is 0 for success and
GSL_EFAILED
if there was a problem reading from the file. The data is assumed to have been written in the native binary format on the same architecture.