Biorithm  1.1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
MTRand Class Reference
Inheritance diagram for MTRand:
MyRand< MyNT >

List of all members.

Public Types

enum  { N = 624 }
enum  { SAVE = N + 1 }
typedef unsigned long uint32

Public Member Functions

 MTRand (const uint32 &oneSeed)
 MTRand (uint32 *const bigSeed)
double rand ()
double rand (const double &n)
double randExc ()
double randExc (const double &n)
double randDblExc ()
double randDblExc (const double &n)
uint32 randInt ()
uint32 randInt (const uint32 &n)
double operator() ()
void seed (uint32 oneSeed)
void seed (uint32 *const bigSeed)
void seed ()
void save (uint32 *saveArray) const
void load (uint32 *const loadArray)

Protected Types

enum  { M = 397 }
enum  { MAGIC = 0x9908b0dfU }

Protected Member Functions

void reload ()
uint32 hiBit (const uint32 &u) const
uint32 loBit (const uint32 &u) const
uint32 loBits (const uint32 &u) const
uint32 mixBits (const uint32 &u, const uint32 &v) const
uint32 twist (const uint32 &m, const uint32 &s0, const uint32 &s1) const

Static Protected Member Functions

static uint32 hash (time_t t, clock_t c)

Protected Attributes

uint32 state [N]
uint32 * pNext
int left

Friends

std::ostream & operator<< (std::ostream &os, const MTRand &mtrand)
std::istream & operator>> (std::istream &is, MTRand &mtrand)

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Friends