Virtual Belgium  2.0
A micro-simulation platform for the Belgian population
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Macros Pages
Ranq1 Struct Reference

Simplest and fastest random number generator recommended by Numerical Recipes. More...

#include <Random.hpp>

Public Member Functions

 Ranq1 (unsigned long long j)
 Constructor j is the seed. More...
 
unsigned long long int64 ()
 Generates an unsigned 64 bits integer. More...
 
double doub ()
 Generates a double. More...
 
float fl ()
 Generates a float. More...
 
unsigned int int32 ()
 Generates an unsigned 32 bits integer. More...
 

Public Attributes

unsigned long long v
 state of the random number generator More...
 

Detailed Description

Simplest and fastest random number generator recommended by Numerical Recipes.

Implements the Ranq1 algorithm.

Constructor & Destructor Documentation

Ranq1::Ranq1 ( unsigned long long  j)
inline

Constructor j is the seed.

Parameters
jthe seed.

Member Function Documentation

double Ranq1::doub ( )
inline

Generates a double.

Returns
a random number
float Ranq1::fl ( )
inline

Generates a float.

Returns
a random number
unsigned int Ranq1::int32 ( )
inline

Generates an unsigned 32 bits integer.

Returns
a random number
unsigned long long Ranq1::int64 ( )
inline

Generates an unsigned 64 bits integer.

Returns
a random number

Member Data Documentation

unsigned long long Ranq1::v

state of the random number generator


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