Inheritance diagram for IntegerRandom:
This class is the base for all of the integer-valued random number generators.
Definition at line 179 of file Random.H.
Public Member Functions | |
IntegerRandom (const unsigned long seed) | |
Generate samples | |
IntegerRandom & | operator>> (int &random_number) |
Output stream operator. | |
int | operator() () |
Function operator. | |
operator int () | |
Integer cast operator. | |
virtual int | number ()=0 |
Generate a sample from the random variable. | |
Moments of the random variable | |
virtual double | mean () const=0 |
virtual double | variance () const=0 |
virtual double | stdDev () const=0 |
IntegerRandom | ( | const unsigned long | seed | ) | [inline] |
IntegerRandom& operator>> | ( | int & | random_number | ) | [inline] |
Output stream operator.
This generates a random number and loads it into a integer variable.
random_number | The variable to be assigned to. |
Definition at line 194 of file Random.H.
References number().
int operator() | ( | ) | [inline] |
operator int | ( | ) | [inline] |
virtual int number | ( | ) | [pure virtual] |
Generate a sample from the random variable.
This function generates a sample from the random variable represented by the class instance.
Implemented in DiscreteUniformRandom, and BernoulliRandom.
Referenced by operator int(), operator()(), and operator>>().
virtual double mean | ( | ) | const [pure virtual] |
Implements MTRand.
Implemented in DiscreteUniformRandom, and BernoulliRandom.
virtual double variance | ( | ) | const [pure virtual] |
Implements MTRand.
Implemented in DiscreteUniformRandom, and BernoulliRandom.
virtual double stdDev | ( | ) | const [pure virtual] |
Implements MTRand.
Implemented in DiscreteUniformRandom, and BernoulliRandom.