- publishing free software manuals
GNU Scientific Library Reference Manual - Third Edition (v1.12)
by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi
Paperback (6"x9"), 592 pages, 60 figures
ISBN 0954612078
RRP £24.95 ($39.95)

Get a printed copy>>>

17.7 Copying random number generator state

The above methods do not expose the random number `state' which changes from call to call. It is often useful to be able to save and restore the state. To permit these practices, a few somewhat more advanced functions are supplied. These include:

Function: int gsl_rng_memcpy (gsl_rng * dest, const gsl_rng * src)
This function copies the random number generator src into the pre-existing generator dest, making dest into an exact copy of src. The two generators must be of the same type.
Function: gsl_rng * gsl_rng_clone (const gsl_rng * r)
This function returns a pointer to a newly created generator which is an exact copy of the generator r.
ISBN 0954612078GNU Scientific Library Reference Manual - Third Edition (v1.12)See the print edition