13 #ifndef ROOT_Math_LCGEngine
14 #define ROOT_Math_LCGEngine
22 virtual double Rndm() = 0;
54 fSeed = (1103515245 *
fSeed + 12345) & 0x7fffffffUL;
59 static unsigned int MinInt() {
return 0; }
61 static unsigned int MaxInt() {
return 0xffffffff; }
63 static int Size() {
return 1; }
65 static std::string
Name() {
return "LCGEngine"; }
68 void SetState(
const std::vector<uint32_t> & state) {
69 assert(!state.empty());
81 const double kCONS = 4.6566128730774E-10;
83 if (rndm != 0)
return kCONS*rndm;
void GetState(std::vector< uint32_t > &state)
void SetSeed(uint32_t seed)
void SetState(const std::vector< uint32_t > &state)
static int Size()
Size of the generator state.
static unsigned int MaxInt()
maximum integer taht can be generated
static unsigned int MinInt()
minimum integer taht can be generated
static std::string Name()
Name of the generator.