[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gsl] alternatives to gsl_rng_fwrite
From: |
Brian Gough |
Subject: |
Re: [Bug-gsl] alternatives to gsl_rng_fwrite |
Date: |
Sun, 08 Mar 2009 17:54:54 +0000 |
User-agent: |
Wanderlust/2.14.0 (Africa) Emacs/22.1 Mule/5.0 (SAKAKI) |
At Fri, 6 Mar 2009 13:00:45 -0800,
Brian Austin wrote:
> There are two aspects that I'd would like to change.
>
> 1. Write the rng state in a non-binary format so that I can read it on
> a different computer from where I wrote it.
>
> 2. Write the rng state to a string instead of a file.
> This will give user more freedom to format the file.
> For example, I'd like to store a set of rng states in the nodes of an xml
> file.
Thanks for your email. There's a problem that the rng states are a
mixture of integer and floating-point types and are not easy to
serialise in C, in any general way. While it would be possible, it
seems like a major task. Do you have an example in mind where would
this is needed?
If you want to access the state data directly, the gsl_rng_state and
gsl_rng_size functions should give all the information needed to
access the state, and e.g. copy it into another area of memory.
--
Brian Gough