In file EO++.h:

class Random

Random Generator Class

Public Methods

static inline double negExp(double _mean)
Returns a random value in a negative exponential distribution
static double normal(double _mean, double _sd)
Returns a random value in a normal distribution
static void seed(unsigned long _seed)
Sets the given seed
static unsigned long uLong(void)
Returns the value in a random position of the table and updates this position with a new random value
static inline double uniform(double _lower, double _upper)
Returns an uniform double value between a range
static inline long uniformInt(long _lower, long _upper)
Returns an uniform long value between a range
static double unit(void)
Returns a random value in [0

Private Methods

static void fillTable(void)
Fills the random table
static unsigned long lahmer(void)
Updates the lahmer seed
static long taus(void)
Updates the taus seed

Documentation

Random Generator Class. Contains a number of methods for generating random numbers with different distributions. It also has its own seeds making it good for use in simulations.
static void seed(unsigned long _seed)
Sets the given seed
Parameters:
_seed - Seed

static double unit(void)
Returns a random value in [0..1]

static unsigned long uLong(void)
Returns the value in a random position of the table and updates this position with a new random value

static inline long uniformInt(long _lower, long _upper)
Returns an uniform long value between a range
Parameters:
_lower - The lowest value
_upper - The uppest value

static inline double uniform(double _lower, double _upper)
Returns an uniform double value between a range
Parameters:
_lower - The lowest value
_upper - The uppest value

static double normal(double _mean, double _sd)
Returns a random value in a normal distribution
Parameters:
_mean - Dsitribution mean
_sd - Standard Deviation

static inline double negExp(double _mean)
Returns a random value in a negative exponential distribution
Parameters:
_mean - Dsitribution mean

static unsigned long lahmer(void)
Updates the lahmer seed
Returns:
The updated Lahmer seed

static long taus(void)
Updates the taus seed
Returns:
The lammer taus updated

static void fillTable(void)
Fills the random table


This class has no child classes.

alphabetic index hierarchy of classes


BinOp