dignea  1.0.0
Diverse Instance Generator with Novelty Search and Evolutionary Algorithms
PseudoRandom Class Reference

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 Public Member Functions

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...
 

Static Public Attributes

static RandomGenerator * randomGenerator_ = nullptr
 

Detailed Description

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.

Member Function Documentation

◆ 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
minBound
maxBound
Returns
double

◆ randInt()

int PseudoRandom::randInt ( int  minBound,
int  maxBound 
)
static

Returns a random integer int the range [minBound, maxBound].

Parameters
minBound
maxBound
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
mean
standardDeviation
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
mean
standardDeviation
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
dimension
Returns
double*

Get a random point from an hypersphere (center = 0, radius = 1) Code taken from Maurice Clerc's implementation

Parameters
dimension
Returns
A pseudo random point

Member Data Documentation

◆ 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: