iaux::iaRandomNumberGenerator Class Reference

#include <iaRandomNumberGenerator.h>

Public Member Functions

 iaRandomNumberGenerator (uint64 seed=1337)
 
 ~iaRandomNumberGenerator ()=default
 
void setSeed (uint64 seed)
 
uint64 getNext ()
 
int64 getNextRange (int64 min, int64 max)
 
int64 getNextRangeExponentialDecrease (int64 min, int64 max, float64 lambda)
 
int64 getNextRangeExponentialIncrease (int64 min, int64 max, float64 lambda)
 
int64 getNextRange (int64 range)
 
float64 getNextFloat ()
 
float64 getNextFloatRange (float64 min, float64 max)
 

Detailed Description

pseudo random number generator

Constructor & Destructor Documentation

◆ iaRandomNumberGenerator()

iaux::iaRandomNumberGenerator::iaRandomNumberGenerator ( uint64  seed = 1337)

init seed

◆ ~iaRandomNumberGenerator()

iaux::iaRandomNumberGenerator::~iaRandomNumberGenerator ( )
default

does nothing

Member Function Documentation

◆ getNext()

uint64 iaux::iaRandomNumberGenerator::getNext ( )
Returns
next random number

◆ getNextFloat()

float64 iaux::iaRandomNumberGenerator::getNextFloat ( )
Returns
next random number as float 0.0-1.0

◆ getNextFloatRange()

float64 iaux::iaRandomNumberGenerator::getNextFloatRange ( float64  min,
float64  max 
)
Returns
next random number as float min-max
Parameters
minthe min value returned
maxthe max value returned

◆ getNextRange() [1/2]

int64 iaux::iaRandomNumberGenerator::getNextRange ( int64  min,
int64  max 
)
Returns
next random number [min, max]
Parameters
minthe min value returned
maxthe max value returned

◆ getNextRange() [2/2]

int64 iaux::iaRandomNumberGenerator::getNextRange ( int64  range)
Returns
next random number [0, range-1]
Parameters
rangethe range of values

◆ getNextRangeExponentialDecrease()

int64 iaux::iaRandomNumberGenerator::getNextRangeExponentialDecrease ( int64  min,
int64  max,
float64  lambda 
)
Returns
next random number with exponential distribution [min, max]

high chances towards min and lower chances towards max

Parameters
minthe min value returned
maxthe max value returned
lambdathis value determines where the median of the distribution curve lies before it gets scaled back to the min max range

◆ getNextRangeExponentialIncrease()

int64 iaux::iaRandomNumberGenerator::getNextRangeExponentialIncrease ( int64  min,
int64  max,
float64  lambda 
)
Returns
next random number with exponential distribution [min, max]

high chances towards max and lower chances towards min

Parameters
minthe min value returned
maxthe max value returned
lambdathis value determines where the median of the distribution curve lies before it gets scaled back to the min max range

◆ setSeed()

void iaux::iaRandomNumberGenerator::setSeed ( uint64  seed)

sets the seed

Parameters
seedthe seed

The documentation for this class was generated from the following files: