This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gsl_rng_fprintf and gsl_rng_fscanf


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello!

I've just put some thought into the matter of reading and writing the GSL RNG
states. We already have the functions gsl_rng_fread and gsl_rng_fwrite for
binary input/output.

I would like to have functions for reading and writing the state from/to text
files (e.g. for parameter files etc.). There seems to be no way to do this in a
platform independent fashion without knowing about the internal structure of the
RNG state.

Therefore it seems to be necessary to add two function pointers

void (*printf) (void *state, FILE *file)
void (*scanf) (FILE *file, void *state)

to the gsl_rng_type struct in the fashion of the get and set functions and
implement the respective function for every single of the RNG types.

Before I set off to do this, I would like to ask the lot of you, if there's any
reason why it shouldn't be done like this?

Cheers
	Olaf
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE/p4ybtQ3riQ3oo/oRApooAKC5XSbdC8491JCwaLZC7/qt7eUFpgCeKW5p
ot1h7k7LIYsQSG5iZOwzBg0=
=EGdX
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]