opencog::MT19937RandGen Class Reference

#include <mt19937ar.h>

Inheritance diagram for opencog::MT19937RandGen:

Inheritance graph
[legend]
Collaboration diagram for opencog::MT19937RandGen:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 MT19937RandGen (unsigned long s)
 MT19937RandGen (unsigned long init_key[], int key_length)
 ~MT19937RandGen ()
int randint ()
float randfloat ()
double randdouble ()
double randDoubleOneExcluded ()
int randint (int n)
int randPositiveNegative ()
unsigned int pos_gaussian_rand (unsigned int std_dev, unsigned int mean)
bool randbool ()
bool biased_randbool (float b)

Private Member Functions

void init ()
void init_genrand (unsigned long s)
void init_by_array (unsigned long init_key[], int key_length)
unsigned long genrand_int32 (void)
long genrand_int31 (void)
double genrand_real1 (void)
double genrand_real2 (void)
double genrand_real3 (void)
double genrand_res53 (void)

Private Attributes

unsigned long * mt
int mti

Static Private Attributes

static int N = 624
static int M = 397
static unsigned long MATRIX_A = 0x9908b0dfUL
static unsigned long UPPER_MASK = 0x80000000UL
static unsigned long LOWER_MASK = 0x7fffffffUL


Detailed Description

Definition at line 55 of file mt19937ar.h.


Constructor & Destructor Documentation

MT19937RandGen::MT19937RandGen ( unsigned long  s  ) 

Definition at line 21 of file mt19937ar.cc.

References init(), and init_genrand().

MT19937RandGen::MT19937RandGen ( unsigned long  init_key[],
int  key_length 
)

Definition at line 26 of file mt19937ar.cc.

References init(), and init_by_array().

MT19937RandGen::~MT19937RandGen (  ) 

Definition at line 31 of file mt19937ar.cc.

References mt.


Member Function Documentation

void MT19937RandGen::init ( void   )  [private]

Definition at line 132 of file mt19937ar.cc.

References mt, mti, and N.

Here is the caller graph for this function:

void MT19937RandGen::init_genrand ( unsigned long  s  )  [private]

Definition at line 138 of file mt19937ar.cc.

References mt, mti, and N.

Here is the caller graph for this function:

void MT19937RandGen::init_by_array ( unsigned long  init_key[],
int  key_length 
) [private]

Definition at line 157 of file mt19937ar.cc.

References init_genrand(), mt, and N.

Here is the caller graph for this function:

unsigned long MT19937RandGen::genrand_int32 ( void   )  [private]

Definition at line 183 of file mt19937ar.cc.

References init_genrand(), LOWER_MASK, M, MATRIX_A, mt, mti, N, and UPPER_MASK.

Here is the caller graph for this function:

long MT19937RandGen::genrand_int31 ( void   )  [private]

Definition at line 221 of file mt19937ar.cc.

References genrand_int32().

Here is the caller graph for this function:

double MT19937RandGen::genrand_real1 ( void   )  [private]

Definition at line 228 of file mt19937ar.cc.

References genrand_int32().

Here is the caller graph for this function:

double MT19937RandGen::genrand_real2 ( void   )  [private]

Definition at line 235 of file mt19937ar.cc.

References genrand_int32().

Here is the caller graph for this function:

double MT19937RandGen::genrand_real3 ( void   )  [private]

Definition at line 242 of file mt19937ar.cc.

References genrand_int32().

double MT19937RandGen::genrand_res53 ( void   )  [private]

Definition at line 249 of file mt19937ar.cc.

References b(), and genrand_int32().

int MT19937RandGen::randint (  )  [virtual]

Implements opencog::RandGen.

Definition at line 36 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_int31(), and opencog::logger().

Here is the caller graph for this function:

float MT19937RandGen::randfloat (  )  [virtual]

Implements opencog::RandGen.

Definition at line 46 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_real1(), and opencog::logger().

Here is the caller graph for this function:

double MT19937RandGen::randdouble (  )  [virtual]

Implements opencog::RandGen.

Definition at line 56 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_real1(), and opencog::logger().

double MT19937RandGen::randDoubleOneExcluded (  )  [virtual]

Implements opencog::RandGen.

Definition at line 66 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_real2(), and opencog::logger().

Here is the caller graph for this function:

int MT19937RandGen::randint ( int  n  )  [virtual]

Implements opencog::RandGen.

Definition at line 76 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_int31(), and opencog::logger().

int MT19937RandGen::randPositiveNegative (  )  [virtual]

Implements opencog::RandGen.

Definition at line 86 of file mt19937ar.cc.

References opencog::Logger::debug(), opencog::logger(), and randint().

unsigned int MT19937RandGen::pos_gaussian_rand ( unsigned int  std_dev,
unsigned int  mean 
) [virtual]

bool MT19937RandGen::randbool (  )  [virtual]

Implements opencog::RandGen.

Definition at line 110 of file mt19937ar.cc.

References opencog::Logger::debug(), genrand_int31(), and opencog::logger().

bool MT19937RandGen::biased_randbool ( float  b  )  [virtual]

Implements opencog::RandGen.

Definition at line 121 of file mt19937ar.cc.

References opencog::Logger::debug(), opencog::logger(), and randfloat().

Here is the caller graph for this function:


Member Data Documentation

int MT19937RandGen::N = 624 [static, private]

Definition at line 61 of file mt19937ar.h.

int MT19937RandGen::M = 397 [static, private]

Definition at line 62 of file mt19937ar.h.

unsigned long MT19937RandGen::MATRIX_A = 0x9908b0dfUL [static, private]

Definition at line 63 of file mt19937ar.h.

unsigned long MT19937RandGen::UPPER_MASK = 0x80000000UL [static, private]

Definition at line 64 of file mt19937ar.h.

unsigned long MT19937RandGen::LOWER_MASK = 0x7fffffffUL [static, private]

Definition at line 65 of file mt19937ar.h.

unsigned long* opencog::MT19937RandGen::mt [private]

Definition at line 67 of file mt19937ar.h.

Definition at line 68 of file mt19937ar.h.


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

Generated on Fri Dec 4 23:24:44 2009 for OpenCog Framework by  doxygen 1.5.6