#include #include #include #include #include typedef unsigned long uint32; // 32 bit unsigned integer class TMotherRandomGenerator { // encapsulate random number generator public: void RandomInit(uint32 seed); // initialization void SetInterval(int min, int max); // set interval for iRandom int iRandom(); // get integer random number double Random(); // get floating point random number TMotherRandomGenerator(uint32 seed=-1);// constructor protected: double x[5]; // history buffer int imin, iinterval; // interval for iRandom };