Next: Correlations
Up: 6: Generation of
Previous: Shift Register Pseudorandom
- The shift register method is unpopular because it is newer and
because it is harder to initialize. However, Chiu describes a
reasonable way using a congruential generator to get first random
numbers.
- Typically, a random number package includes a call to a routine
with a name like ranset.
- A call ranset (seed)
- sets seed for the congruential method.
- If you want a truly random start, a standard ``dodge'' is to set
the seed to the binary image (remember is just a (32 bit)
integer) of the system clock.
- One may wish to redo a calculation with the same initial seed so
use
- clock (seed)
- print ( in binary form, seed)
- ranset (seed)
Geoffrey Fox, Northeast Parallel Architectures Center at Syracuse University, gcf@npac.syr.edu