Hi ALL,
I need to sample from several instances of a random number generator
in the same program. Apparently, Octave does not let me do it. It
seems as though that "rand" has only one global state. The best advice
from the manual is to save/restore rand state with
v = rand("state")
rand("state", v)
Since I have to draw only one number at a time from each RNG millions
of time this can quickly become a nuisance. Also, it is plain ugly!
Octave is object oriented, right? Why not to have a RNG constructor
rng1= RNGuniform(seed)
...
sample= rng1.get()
or something similar. Is it a Matlab heritage or I am missing
something important?
Thanks,
--Leo--