The following commands on the RNG class can be accessed from OTcl
and are found in tools/rng.cc:
- seed
![$n$](img8.png)
- - 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
![$std$](img108.png)
- - return a number sampled from a normal
distribution with the given average and standard deviation
- lognormal
![$std$](img108.png)
- - 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
![$mu$](img109.png)
- - return a number sampled from an
exponential distribution with mean
- uniform
![$max$](img111.png)
- - return an integer sampled from a
uniform distribution on [
,
]
- integer
![$k$](img112.png)
- - return an integer sampled from a uniform
distribution on [0,
-1]
Tom Henderson
2011-11-05