This is the interface for the random number generator in dignea. The idea is that all the random numbers will be generated using a single random generator which will be accesible throug this interface.
More...
#include <PseudoRandom.h>
|
static double | randDouble () |
| Generates a random double value between 0.0 and 1.0. More...
|
|
static int | randInt (int minBound, int maxBound) |
| Returns a random integer int the range [minBound, maxBound]. More...
|
|
static double | randDouble (double minBound, double maxBound) |
| Returns a random double in the range [minBound, maxBound]. More...
|
|
static double | randNormal (double mean, double standardDeviation) |
| Returns a random value extracted from a Normal Distribution with mean and standardDeviation. More...
|
|
static double * | randSphere (int dimension) |
| Get random points from an hypersphere (center = 0, radius = 1) Code taken from Maurice Clerc's implementations. More...
|
|
This is the interface for the random number generator in dignea. The idea is that all the random numbers will be generated using a single random generator which will be accesible throug this interface.
◆ randDouble() [1/2]
double PseudoRandom::randDouble |
( |
| ) |
|
|
static |
Generates a random double value between 0.0 and 1.0.
- Returns
- double
◆ randDouble() [2/2]
double PseudoRandom::randDouble |
( |
double |
minBound, |
|
|
double |
maxBound |
|
) |
| |
|
static |
Returns a random double in the range [minBound, maxBound].
- Parameters
-
- Returns
- double
◆ randInt()
int PseudoRandom::randInt |
( |
int |
minBound, |
|
|
int |
maxBound |
|
) |
| |
|
static |
Returns a random integer int the range [minBound, maxBound].
- Parameters
-
- Returns
- int
◆ randNormal()
double PseudoRandom::randNormal |
( |
double |
mean, |
|
|
double |
standardDeviation |
|
) |
| |
|
static |
Returns a random value extracted from a Normal Distribution with mean and standardDeviation.
- Parameters
-
- Returns
- double
Use the polar form of the Box-Muller transformation to obtain a pseudo random number from a Gaussian distribution Code taken from Maurice Clerc's implementation
- Parameters
-
- Returns
- A pseudo random number
◆ randSphere()
double * PseudoRandom::randSphere |
( |
int |
dimension | ) |
|
|
static |
Get random points from an hypersphere (center = 0, radius = 1) Code taken from Maurice Clerc's implementations.
- Parameters
-
- Returns
- double*
Get a random point from an hypersphere (center = 0, radius = 1) Code taken from Maurice Clerc's implementation
- Parameters
-
- Returns
- A pseudo random point
◆ randomGenerator_
RandomGenerator * PseudoRandom::randomGenerator_ = nullptr |
|
static |
This file is aimed at defining the interface for the random generator. The idea is that all the random numbers will be generated using a single random generator which will be accesible throug this interface.
The documentation for this class was generated from the following files:
- include/dignea/utilities/random/PseudoRandom.h
- src/dignea/utilities/random/PseudoRandom.cpp