Page 1 of 1

randomize() rather than system time seed?

Posted: Tue Mar 06, 2007 9:26 am
by abogaard
Hello all,

I am attempting to get a true output of random numbers utilizing the c function randomize() in stdlib.h

I must be missing something critical about how neuron compiles everything because I cannot get it to work.

Any ideas?

Posted: Wed Mar 07, 2007 11:48 am
by ted
First, a word about terminology. Digital computers don't generate "real" random numbers.
They generate pseudorandom sequences that may pass various tests for statistical
independence, but they're not random in the same sense as, for example, the sequence
of times at which a radioactive material emits alpha particles.

Now for your question. The Random class makes it unnecessary to reach into the bowels
of a C library. If you need to generate different random sequences, use a different seed for
each sequence. To ensure reproducibility of resuts, keep a record of the seeds that were
used for each run. The highest quality generator is MCellRan4; to ensure statistical
independence of pseudorandom number streams, note that
each stream should be statistically independent as long as the highindex values differ by more than the eventual length of the stream.
--see
http://www.neuron.yale.edu/neuron/stati ... #MCellRan4