swarm-support
[Top][All Lists]
Advanced

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

Re: Saving and reading rng state from (ascii) file?


From: Marcus G. Daniels
Subject: Re: Saving and reading rng state from (ascii) file?
Date: 13 Jun 2000 08:50:50 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "JK" == Jan Kreft <address@hidden> writes:

JK> I'm trying to regularly save the state of the default MT19937 rng
JK> into a file, to be able to restart a run where it broke off due to
JK> power cut etc.

The generators should be extended with
-{lisp,hdf5}{In,Out{Deep,Shallow}} methods so that loading and saving
can be done in the same way as other objects.  One problem with the
way it is now is that the state structure is private and specific to
the generator.  However, you can load and save the date in untyped
binary format using C functions like fread or fwrite.  The size can be
acquired from getStateSize.


                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

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