X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=simul.h;h=b62132a66a636115c3484073d7277bc5898d0eeb;hp=07c1c65ec8d243b147bc70150b3e50fc381824c4;hb=refs%2Fheads%2Fmaster;hpb=c729fa33c6e2f9e3e1b374c66a55265525e7d974 diff --git a/simul.h b/simul.h index 07c1c65..b62132a 100644 --- a/simul.h +++ b/simul.h @@ -8,8 +8,8 @@ class simul { public: - simul(unsigned int seed) : rg(boost::mt19937(seed)) { - } + simul(unsigned int seed) : engine(seed), rg(engine, boost::random::uniform_01<>()) { + } // interval : [,) // random number should be in [0, arr[len - 1]) @@ -35,7 +35,8 @@ public: double random() { return rg(); }; private: - boost::uniform_01 rg; + boost::random::mt19937 engine; + boost::random::variate_generator > rg; }; #endif /* SIMUL_H_ */