KrisLibrary  1.0.0
Static Public Member Functions | List of all members
StandardRNG Struct Reference

Interface for a random number generator. More...

#include <random.h>

Static Public Member Functions

static void seed (unsigned long n)
 
static long int maxValue ()
 
static long int randInt ()
 
static float randFloat ()
 
static double randDouble ()
 
static long int randInt (long int n)
 helpers
 
static float randFloat (float a, float b)
 
static double randDouble (double a, double b)
 

Detailed Description

Interface for a random number generator.

These RNG's have the following structure:

struct RNG {
void seed(unsigned long);
long int maxValue() const;
long int randInt(); //random long in [0,max]
float randFloat(); //floating point value in [0,1]
double randDouble(); //double fp value in [0,1]
};

This RNG uses the rand() function declared in stdlib.h.


The documentation for this struct was generated from the following file: