A collection of basic random number generation algorithms. More...
#include <yarp/os/Random.h>
Static Public Member Functions | |
| static double | uniform () |
| Generates a random number in the range 0 to 1. | |
| static double | normal (double m, double s) |
| A normal random number generator. | |
| static void | seed (int seed) |
| Sets the seed of the random number generator. | |
| static double | normal () |
| static int | uniform (int min, int max) |
| A random number in a specified range. | |
|
static |
Definition at line 21 of file Random.cpp.
A normal random number generator.
| m | is the mean of the gaussian distribution. |
| s | is the standard deviation of the distribution. |
Definition at line 26 of file Random.cpp.
Sets the seed of the random number generator.
| seed | is the new seed of the random number generator. |
Definition at line 32 of file Random.cpp.
|
static |
Generates a random number in the range 0 to 1.
Definition at line 15 of file Random.cpp.
A random number in a specified range.
| min | is the minimum of the range. |
| max | is the maximum of the range. |
Definition at line 38 of file Random.cpp.