The following commands on the RNG class can be accessed from OTcl
and are found in tools/rng.cc:
- seed
- - seed the RNG to , if , the seed
is set according to the current time and a counter
- next-random
- - return the next random number
- seed
- - return the current value of the seed
- next-substream
- - advance to the next substream
- reset-start-substream
- - reset the stream to the beginning
of the current substream
- normal
- - return a number sampled from a normal
distribution with the given average and standard deviation
- lognormal
- - return a number sampled from a
lognormal distribution with the given average and standard deviation
The following commands on the RNG class can be accessed from OTcl
and are found in tcl/lib/ns-random.tcl:
- exponential
- - return a number sampled from an
exponential distribution with mean
- uniform
- - return an integer sampled from a
uniform distribution on [, ]
- integer
- - return an integer sampled from a uniform
distribution on [0, -1]
Tom Henderson
2011-11-05