RNG.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef KLEE_UTIL_RNG_H
00011 #define KLEE_UTIL_RNG_H
00012
00013 namespace klee {
00014 class RNG {
00015 private:
00016
00017 static const int N = 624;
00018 static const int M = 397;
00019 static const unsigned int MATRIX_A = 0x9908b0dfUL;
00020 static const unsigned int UPPER_MASK = 0x80000000UL;
00021 static const unsigned int LOWER_MASK = 0x7fffffffUL;
00022
00023 private:
00024 unsigned int mt[N];
00025 int mti;
00026
00027 public:
00028 RNG(unsigned int seed=5489UL);
00029
00030 void seed(unsigned int seed);
00031
00032
00033 unsigned int getInt32();
00034
00035 int getInt31();
00036
00037 double getDoubleLR();
00038 float getFloatLR();
00039
00040 double getDoubleL();
00041 float getFloatL();
00042
00043 double getDouble();
00044 float getFloat();
00045
00046 bool getBool();
00047 };
00048 }
00049
00050 #endif