PreviousIndexLast

[bug-gsl] Re: saving the rng state (2008-05-16)

From: Brian Gough <bjg@gnu.org>
Subject: Re: saving the rng state
Date: Fri, 16 May 2008 08:53:11 +0100
To: Jochen Martin Eppler <eppler@........................>
Cc: bug-gsl@gnu.org

At Thu, 15 May 2008 14:31:47 +0200,
Jochen Martin Eppler wrote:
> The documentation on reading and writing random number generator state
> http://www.gnu.org/software/gsl/manual/html_node/Reading-and-writing-random-number-generator-state.html
> says in the first line that the state can be written, both as binary
> data or formatted text. The documentation of the functions there,
> however only explain this for the binary case. Is the documentation
> wrong or is there a thing I missed? If the latter is the case, can
> you please point me to some example code for writing the state as
> (presumably portable) formatted text?

Thanks for your email. The documentation is wrong there, I will
correct it. Only the binary gsl_rng_fread and gsl_rng_fwrite
functions are supported. The binary data is not portable in general,
it is just a raw copy of the struct.

--
Brian Gough

GNU Scientific Library -
http://www.gnu.org/software/gsl/