#include <mtrand.h>
Public Member Functions | |
MTRand_int32 () | |
MTRand_int32 (unsigned long s) | |
MTRand_int32 (const unsigned long *array, int size) | |
unsigned long | operator() () |
void | seed (unsigned long) |
void | seed (const unsigned long *, int size) |
virtual | ~MTRand_int32 () |
Protected Member Functions | |
unsigned long | rand_int32 () |
Private Member Functions | |
void | gen_state () |
MTRand_int32 (const MTRand_int32 &) | |
void | operator= (const MTRand_int32 &) |
unsigned long | twiddle (unsigned long, unsigned long) |
Static Private Attributes | |
static bool | init = false |
static const int | m = 397 |
static const int | n = 624 |
static int | p = 0 |
static unsigned long | state [n] = {0x0UL} |
MTRand_int32::MTRand_int32 | ( | ) | [inline] |
MTRand_int32::MTRand_int32 | ( | unsigned long | s | ) | [inline] |
MTRand_int32::MTRand_int32 | ( | const unsigned long * | array, |
int | size | ||
) | [inline] |
virtual MTRand_int32::~MTRand_int32 | ( | ) | [inline, virtual] |
MTRand_int32::MTRand_int32 | ( | const MTRand_int32 & | ) | [private] |
void MTRand_int32::gen_state | ( | ) | [private] |
Definition at line 12 of file mtrand.cpp.
unsigned long MTRand_int32::operator() | ( | ) | [inline] |
Reimplemented in MTRand53, MTRand_open, MTRand_closed, and MTRand.
void MTRand_int32::operator= | ( | const MTRand_int32 & | ) | [private] |
unsigned long MTRand_int32::rand_int32 | ( | ) | [inline, protected] |
void MTRand_int32::seed | ( | unsigned long | s | ) |
Definition at line 21 of file mtrand.cpp.
void MTRand_int32::seed | ( | const unsigned long * | array, |
int | size | ||
) |
Definition at line 33 of file mtrand.cpp.
unsigned long MTRand_int32::twiddle | ( | unsigned long | u, |
unsigned long | v | ||
) | [inline, private] |
bool MTRand_int32::init = false [static, private] |
const int MTRand_int32::m = 397 [static, private] |
const int MTRand_int32::n = 624 [static, private] |
int MTRand_int32::p = 0 [static, private] |
unsigned long MTRand_int32::state = {0x0UL} [static, private] |