14 static std::uniform_real_distribution<double>
probaGen(0.,1.);
38 std::uniform_real_distribution<double> dist(min, max);
50 std::uniform_int_distribution<int> dist(min, max);
62 std::normal_distribution<double> dist(mean, var);
73 std::exponential_distribution<double> dist(lambda);
85 std::normal_distribution<double> dist(mean, bound/3.);
97 for (
auto it = std::make_move_iterator(
values.begin()),
98 end = std::make_move_iterator(
values.end()); it != end; ++it){
102 std::piecewise_linear_distribution<double> dist(i.
begin(), i.
end(), w.
begin());
114 std::lognormal_distribution<double> dist(mu, sigma2);
126 double sigma2 =
log(1+(
std *
std)/(mean * mean));
127 double mu =
log(mean) - 0.5*sigma2;
A simple vector class template.
void push_back(const T &value)
Adds an element to the end of the vector.
iterator begin()
Returns an iterator to the first element.
iterator end()
Returns an iterator to the last element.
CompositeGenerator< T > values(T val1, T val2)
static std::uniform_real_distribution< double > probaGen(0., 1.)
@ignore
static double getLogNormalDouble(double mu, double sigma2)
Generates a random double in a log-normal distribution.
static double getProba()
Generates a random probability between 0 and 1.
static double getLogNormalDoubleMeanStd(double mean, double std)
Generates a random double in a log-normal distribution using mean and standard deviation.
static double getBoundedNormalDouble(double mean, double bound)
Generates a random double in a bounded normal distribution.
static int getUniformInt(int min, int max)
Generates a random integer in a uniform distribution.
static double getExponentialDouble(double lambda)
Generates a random double in an exponential distribution.
static void initRandomSeed(int seed=clock())
Initializes the random seed.
static double getUniformDouble(double min, double max)
Generates a random double in a uniform distribution.
static double getLinearDouble(std::vector< std::pair< double, double > > values)
Generates a random double in a piecewise linear distribution.
static double getNormalDouble(double mean, double var)
Generates a random double in a normal distribution.
Provides common mathematical functions and vector operations.
double log(double x)
Computes the natural logarithm of a number.
static random_engine_t & globalRand()
access to the static global random engine.This pseudo - random generator is* used in random 3D vector...