17#ifndef IGNITION_MATH_RAND_HH_
18#define IGNITION_MATH_RAND_HH_
24#include <ignition/math/config.hh>
30 inline namespace IGNITION_MATH_VERSION_NAMESPACE
47 class IGNITION_MATH_VISIBLE
Rand
52 public:
static void Seed(
unsigned int _seed);
57 public:
static unsigned int Seed();
62 public:
static double DblUniform(
double _min = 0,
double _max = 1);
67 public:
static double DblNormal(
double _mean = 0,
double _sigma = 1);
77 public:
static int32_t
IntNormal(
int _mean,
int _sigma);
81 private:
static uint32_t &SeedMutable();
Random number generator class.
Definition Rand.hh:48
static void Seed(unsigned int _seed)
Set the seed value.
static double DblUniform(double _min=0, double _max=1)
Get a double from a uniform distribution.
static unsigned int Seed()
Get the seed value.
static double DblNormal(double _mean=0, double _sigma=1)
Get a double from a normal distribution.
static int32_t IntNormal(int _mean, int _sigma)
Get an integer from a normal distribution.
static int32_t IntUniform(int _min, int _max)
Get an integer from a uniform distribution.
std::uniform_int_distribution< int32_t > UniformIntDist
Definition Rand.hh:43
std::normal_distribution< double > NormalRealDist
Definition Rand.hh:40
std::uniform_real_distribution< double > UniformRealDist
Definition Rand.hh:37
std::mt19937 GeneratorType
Definition Rand.hh:34