MT::Rnd Class Reference
#include <std.h>
List of all members.
Detailed Description
A random number generator. An global instantiation
MT::rnd
of a
Rnd
object is created. Use this one object to get random numbers.
Definition at line 567 of file std.h.
Public Member Functions
|
-
unsigned long seed (unsigned long n)
- initialize with a specific seed
-
unsigned long seed ()
- use Parameter<uint>("seed") as seed
-
unsigned long clockSeed ()
- uses the internal clock to generate a seed
|
-
uint num ()
- a initeger random number uniformly distributed in [0,?]
-
uint operator() ()
- same as
num()
-
uint num (uint limit)
- a initeger random number uniformly distributed in [0,
i-1
]
-
uint num (int lo, int hi)
-
uint operator() (uint i)
- same as
num(i)
-
uint operator() (int lo, int hi)
-
double uni ()
- a random variable uniformly distributed in [0,1]
-
double uni (double low, double high)
- a random variable uniformly distributed in [
low
, high
]
-
double gauss (double stdDev)
- a gaussian random variable with mean zero
-
uint poisson (double mean)
- a positive integer drawn from a poisson distribution with given
mean
; is case mean>100
, a (positive) gauss number floor
(mean+gauss(sqrt(mean))+.5) is returned
The documentation for this class was generated from the following file:
[]