52 std::random_device rd;
53 std::mt19937 mt_eng = std::mt19937(rd());
54 std::uniform_real_distribution<double> real_dist(bound_min, bound_max);
56 return real_dist(mt_eng);
73 std::random_device rd;
74 std::mt19937 mt_eng = std::mt19937(rd());
75 std::uniform_real_distribution<double> real_dist(bound_min, bound_max);
79 for (
int i = 0; i < num; i++) {
80 num_list[i] = real_dist(mt_eng);
A class for generating random numbers.
Definition utils_distributions.hpp:15
double GetUniformDistribution(double bound_min, double bound_max)
Generate a random number from a uniform distribution.
Definition utils_distributions.hpp:51
static RandomEngine & GetInstance()
Get a reference to the singleton RandomEngine instance.
Definition utils_distributions.hpp:35
RandomEngine(const RandomEngine &)=delete
Delete copy constructor.
VecXT< double > GetUniformDistribution(double bound_min, double bound_max, int num)
Generate a list of random numbers from a uniform distribution.
Definition utils_distributions.hpp:71
RandomEngine & operator=(const RandomEngine &)=delete
Delete copy assignment operator.
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31