#include <mt19937ar.h>


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 |
Definition at line 55 of file mt19937ar.h.
| MT19937RandGen::MT19937RandGen | ( | unsigned long | s | ) |
| MT19937RandGen::MT19937RandGen | ( | unsigned long | init_key[], | |
| int | key_length | |||
| ) |
| MT19937RandGen::~MT19937RandGen | ( | ) |
| void MT19937RandGen::init | ( | void | ) | [private] |
| void MT19937RandGen::init_genrand | ( | unsigned long | s | ) | [private] |
| 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.

| 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.

| long MT19937RandGen::genrand_int31 | ( | void | ) | [private] |
Definition at line 221 of file mt19937ar.cc.
References genrand_int32().

| double MT19937RandGen::genrand_real1 | ( | void | ) | [private] |
Definition at line 228 of file mt19937ar.cc.
References genrand_int32().

| double MT19937RandGen::genrand_real2 | ( | void | ) | [private] |
Definition at line 235 of file mt19937ar.cc.
References genrand_int32().

| double MT19937RandGen::genrand_real3 | ( | void | ) | [private] |
| double MT19937RandGen::genrand_res53 | ( | void | ) | [private] |
| int MT19937RandGen::randint | ( | ) | [virtual] |
Implements opencog::RandGen.
Definition at line 36 of file mt19937ar.cc.
References opencog::Logger::debug(), genrand_int31(), and opencog::logger().

| float MT19937RandGen::randfloat | ( | ) | [virtual] |
Implements opencog::RandGen.
Definition at line 46 of file mt19937ar.cc.
References opencog::Logger::debug(), genrand_real1(), and opencog::logger().

| 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().

| 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] |
Implements opencog::RandGen.
Definition at line 96 of file mt19937ar.cc.
References opencog::Logger::debug(), combo::id::log, opencog::logger(), PI, and randDoubleOneExcluded().
| 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().

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.
int opencog::MT19937RandGen::mti [private] |
Definition at line 68 of file mt19937ar.h.
1.5.6