Class rng (o2scl)¶
-
template<class fp_t = double>
class rng¶ Simple C++11 random number generator class.
Public Functions
-
inline rng()¶
-
inline void clock_seed()¶
Set the seed using
time(0)
-
inline unsigned int get_seed() const¶
Get the seed.
-
inline void set_seed(unsigned int s)¶
Set the seed.
-
inline unsigned long int random_int(unsigned long int max = 1) const¶
Return random integer in \([0,\mathrm{max}-1]\).
Public Members
-
mutable std::mt19937 def_engine¶
Random number engine.
-
inline rng()¶