#include <BasicRandomNumberGenerator.h>
Collaboration diagram for BasicRandomNumberGenerator:
Public Member Functions | |
BasicRandomNumberGenerator () | |
void | setSeed (const unsigned int seed) |
Set the random seed. | |
unsigned int | getSeed () |
bool | getBool () |
Returns one bit from the random buffer. | |
long | getInteger (const long min=0, const long max=RAND_MAX) |
double | getRatio () |
Static Public Member Functions | |
BasicRandomNumberGenerator * | getInstance () |
Get a pointer to an instance of BasicRandomNumberGenerator. | |
Protected Member Functions | |
virtual | ~BasicRandomNumberGenerator () |
Private Attributes | |
unsigned int | seed |
int | bitBuf |
unsigned int | bits |
Static Private Attributes | |
BasicRandomNumberGenerator * | singleton = NULL |
|
|
|
|
|
Returns one bit from the random buffer.
|
|
Get a pointer to an instance of BasicRandomNumberGenerator. Creates an instance of the default implementation.
|
|
|
|
|
|
|
|
Set the random seed. Using the same seed will generate the same sequence of random numbers. |
|
|
|
|
|
|
|
|