#include <Random.h>
Public Member Functions | |
| Random (void) | |
| Random (unsigned seeed) | |
| ~Random (void) | |
| Random (const Random &rhs) | |
| Random & | operator= (const Random &rhs) |
| unsigned long | Seed () const |
| void | Seed (unsigned long seeed) |
| unsigned long | Next () |
| float | NextFloat () |
| bool | NextBool (float probability=0.5f) |
A random class implementing the Mersenne Twister.
| cl7::utilities::Random::Random | ( | void | ) |
Default constructor.
| cl7::utilities::Random::Random | ( | unsigned | seeed | ) | [explicit] |
Explicit constructor.
| cl7::utilities::Random::~Random | ( | void | ) |
Destructor.
| cl7::utilities::Random::Random | ( | const Random & | rhs | ) |
Copy constructor.
| unsigned long cl7::utilities::Random::Next | ( | ) |
Returns the next random number (unsigned long).
Returns the next random number.
| bool cl7::utilities::Random::NextBool | ( | float | probability = 0.5f |
) |
Returns the next random boolean.
| float cl7::utilities::Random::NextFloat | ( | ) |
Returns the next random float.
| void cl7::utilities::Random::Seed | ( | unsigned long | seeed | ) |
Resets the seed.
| unsigned long cl7::utilities::Random::Seed | ( | ) | const [inline] |
Returns the current seed.
1.7.1