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]

Re: RN generators Seed


On Tue, Aug 26, 2003 at 12:15:27AM -0500, Maura Edeweiss Monville wrote:
> I'm currently using a RNG from the GNU Scietific Library in my simulation
> I need to rerun my simulation many times with different seeds.
> A friend of mine states the following:
> "You can use the final random seed of a run as the starting random seed of
> the next run (as you probably know, the random generators usually start
> with a seed and then modify it in the process of generating random
> numbers, so essentially the seed becomes a random number itself)"
> I wonder how the final seed value can be obtained when using GSL Random??
> Number Generators .... I only found the possibility to read and save the?
> RNG "status". I do not know the relation between the RNG "status" and the
> RNG "seed" ...???? Can anyone help in this regards ?

I don't know the exact answer to your question, but I do have some
suggestions.  I often use the current time in seconds to seed an
RNG.  There is a slight problem with this.  If one simulation (or in
my case, setting up a simulation) takes less than a second, two runs
may use the same seed.  I ended up switching to using the bash
shell's $RANDOM variable.  It's limited to 16-bits, but it could be
combined with the time to get a better starting seed.

-- 
Jeff Spirko   spirko@lehigh.edu   spirko@yahoo.com   WD3V   |=>

The study of non-linear physics is like the study of non-elephant biology.

All theoretical chemistry is really physics;
and all theoretical chemists know it. -- Richard P. Feynman 


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