Random number generator class.
More...
#include <ignition/math/Rand.hh>
|
static double | DblNormal (double _mean=0, double _sigma=1) |
| Get a double from a normal distribution.
|
|
static double | DblUniform (double _min=0, double _max=1) |
| Get a double from a uniform 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.
|
|
static unsigned int | Seed () |
| Get the seed value.
|
|
static void | Seed (unsigned int _seed) |
| Set the seed value.
|
|
Random number generator class.
◆ DblNormal()
static double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::DblNormal |
( |
double | _mean = 0, |
|
|
double | _sigma = 1 ) |
|
static |
Get a double from a normal distribution.
- Parameters
-
[in] | _mean | Mean value for the distribution |
[in] | _sigma | Sigma value for the distribution |
◆ DblUniform()
static double ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::DblUniform |
( |
double | _min = 0, |
|
|
double | _max = 1 ) |
|
static |
Get a double from a uniform distribution.
- Parameters
-
[in] | _min | Minimum bound for the random number |
[in] | _max | Maximum bound for the random number |
◆ IntNormal()
static int32_t ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::IntNormal |
( |
int | _mean, |
|
|
int | _sigma ) |
|
static |
Get an integer from a normal distribution.
- Parameters
-
[in] | _mean | Mean value for the distribution |
[in] | _sigma | Sigma value for the distribution |
◆ IntUniform()
static int32_t ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::IntUniform |
( |
int | _min, |
|
|
int | _max ) |
|
static |
Get an integer from a uniform distribution.
- Parameters
-
[in] | _min | Minimum bound for the random number |
[in] | _max | Maximum bound for the random number |
◆ Seed() [1/2]
static unsigned int ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::Seed |
( |
| ) |
|
|
static |
Get the seed value.
- Returns
- The seed value used to initialize the random number generator.
◆ Seed() [2/2]
static void ignition::math::IGNITION_MATH_VERSION_NAMESPACE::Rand::Seed |
( |
unsigned int | _seed | ) |
|
|
static |
Set the seed value.
- Parameters
-
[in] | _seed | The seed used to initialize the randon number generator. |
The documentation for this class was generated from the following file: