CYCLUS
|
A random number generator.
Definition at line 20 of file random_number_generator.h.
#include <random_number_generator.h>
Public Member Functions | |
void | Initialize (SimInfo si) |
std::uint32_t | random () |
double | random_01 () |
int | random_normal_int (double mean, double std_dev, int low=0, int high=std::numeric_limits< int >::max()) |
double | random_normal_real (double mean, double std_dev, double low=0, double high=std::numeric_limits< double >::max()) |
int | random_uniform_int (int low, int high) |
double | random_uniform_real (double low, double high) |
Static Public Member Functions | |
static NormalDist | makeNormalDist (double mean, double std_dev, double min, double max) |
Initialize from seed.
Definition at line 14 of file random_number_generator.cc.
|
inlinestatic |
Definition at line 59 of file random_number_generator.h.
std::uint32_t cyclus::RandomNumberGenerator::random | ( | ) |
Definition at line 21 of file random_number_generator.cc.
double cyclus::RandomNumberGenerator::random_01 | ( | ) |
wrappers for boost::random distributions
geenerate a random number between [0, 1)
Definition at line 25 of file random_number_generator.cc.
int cyclus::RandomNumberGenerator::random_normal_int | ( | double | mean, |
double | std_dev, | ||
int | low = 0, | ||
int | high = std::numeric_limits<int>::max() ) |
generates an integer from a normal distribution, with truncation uses rounding to convert double to int
Definition at line 52 of file random_number_generator.cc.
double cyclus::RandomNumberGenerator::random_normal_real | ( | double | mean, |
double | std_dev, | ||
double | low = 0, | ||
double | high = std::numeric_limits<double>::max() ) |
generate a double from a normal distribution, with truncation at low and high
Definition at line 42 of file random_number_generator.cc.
generate a random integer between [low, high)
Definition at line 30 of file random_number_generator.cc.
generate a random real number between [low, high)
Definition at line 36 of file random_number_generator.cc.