bug-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gsl] alternatives to gsl_rng_fwrite


From: Brian Austin
Subject: Re: [Bug-gsl] alternatives to gsl_rng_fwrite
Date: Tue, 10 Mar 2009 11:54:48 -0700

Hi Brian, thanks for your thoughtful reply.

>> 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.

I understand your point about the problems with serializing the
states. I hadn't thought it through quite that far, but figured it
would be simple because they're already being serialized by
gsl_rng_fwrite. I agree that making the file human readable would
require a lot of work.

>> Do you have an example in mind where would this is needed?

I'm trying hard to make my input/output/restart files xml. (Though I
don't have many compelling reasons for it.)
I can't do that with gsl_rng_fwrite for two reasons.
First, it seems silly to write the state with gsl_rng_fwrite just to
re-read it so I can write it in a different format.
Second, the binary data needs to be encoded to eliminate illegal characters.
Thanks to your note, I see that I can use gsl_rng_state to access the
state and encode it, bypassing gsl_rng_fwrite.

I still maintain that it would be better if these were written in a
platform independent way, but accounting for endianness, etc is beyond
me (for now) and perhaps outside the scope of GSL.

-Brian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]