#include <randomc.h>
Inherited by TRandomCombined< CRandomMother, CRandomMersenne > [private]
.
Public Member Functions | |
CRandomMersenne (uint32 seed) | |
void | RandomInit (uint32 seed) |
void | RandomInitByArray (uint32 seeds[], int length) |
int | IRandom (int min, int max) |
int | IRandomX (int min, int max) |
double | Random () |
uint32 | BRandom () |
Private Types | |
enum | TArch { LITTLE_ENDIAN1, BIG_ENDIAN1, NONIEEE } |
Private Member Functions | |
void | Init0 (uint32 seed) |
Private Attributes | |
uint32 | mt [MERS_N] |
int | mti |
uint32 | LastInterval |
uint32 | RLimit |
TArch | Architecture |
Definition at line 135 of file randomc.h.
enum CRandomMersenne::TArch [private] |
CRandomMersenne::CRandomMersenne | ( | uint32 | seed | ) | [inline] |
void CRandomMersenne::RandomInit | ( | uint32 | seed | ) |
Definition at line 35 of file mersenne.cpp.
References BRandom(), and Init0().
Referenced by CRandomMersenne().
void CRandomMersenne::RandomInitByArray | ( | uint32 | seeds[], | |
int | length | |||
) |
int CRandomMersenne::IRandom | ( | int | min, | |
int | max | |||
) |
int CRandomMersenne::IRandomX | ( | int | min, | |
int | max | |||
) |
double CRandomMersenne::Random | ( | ) |
Reimplemented in TRandomCombined< CRandomMother, CRandomMersenne >.
Definition at line 110 of file mersenne.cpp.
References Architecture, BIG_ENDIAN1, BRandom(), LITTLE_ENDIAN1, and NONIEEE.
Referenced by IRandom().
uint32 CRandomMersenne::BRandom | ( | ) |
Definition at line 72 of file mersenne.cpp.
References MERS_A, MERS_B, MERS_C, MERS_L, MERS_M, MERS_N, MERS_R, MERS_S, MERS_T, MERS_U, mt, and mti.
Referenced by IRandomX(), Random(), RandomInit(), and RandomInitByArray().
void CRandomMersenne::Init0 | ( | uint32 | seed | ) | [private] |
Definition at line 20 of file mersenne.cpp.
References Architecture, BIG_ENDIAN1, LITTLE_ENDIAN1, MERS_N, mt, mti, and NONIEEE.
Referenced by RandomInit(), and RandomInitByArray().
uint32 CRandomMersenne::mt[MERS_N] [private] |
Definition at line 172 of file randomc.h.
Referenced by BRandom(), Init0(), and RandomInitByArray().
int CRandomMersenne::mti [private] |
Definition at line 173 of file randomc.h.
Referenced by BRandom(), Init0(), and RandomInitByArray().
uint32 CRandomMersenne::LastInterval [private] |
uint32 CRandomMersenne::RLimit [private] |
TArch CRandomMersenne::Architecture [private] |