iLand
Classes | Macros | Functions
randomgenerator.h File Reference
#include <cstdlib>
#include <math.h>
#include <time.h>

Go to the source code of this file.

Classes

class  RandomGenerator
 

Macros

#define RANDOMGENERATORSIZE   500000
 
#define RANDOMGENERATORROTATIONS   0
 

Functions

double nrandom (const double &p1, const double &p2)
 nrandom returns a random number from [p1, p2] -> p2 is a possible result! More...
 
double drandom ()
 returns a random number in [0,1] (i.e.="1" is a possible result!) More...
 
int irandom (int from, int to)
 return a random number from "from" to "to" (excluding 'to'.), i.e. irandom(3,6) results in 3, 4 or 5. More...
 

Macro Definition Documentation

◆ RANDOMGENERATORROTATIONS

#define RANDOMGENERATORROTATIONS   0

◆ RANDOMGENERATORSIZE

#define RANDOMGENERATORSIZE   500000

Function Documentation

◆ drandom()

double drandom ( )
inline

returns a random number in [0,1] (i.e.="1" is a possible result!)

◆ irandom()

int irandom ( int  from,
int  to 
)
inline

return a random number from "from" to "to" (excluding 'to'.), i.e. irandom(3,6) results in 3, 4 or 5.

◆ nrandom()

double nrandom ( const double &  p1,
const double &  p2 
)
inline

nrandom returns a random number from [p1, p2] -> p2 is a possible result!


Global access functions for random numbers