BRL-CAD

Mersenne Twister random number generation as defined by MT19937. More...

Collaboration diagram for Mersenne Twister:

Files

file  randmt.h
 

Functions

double bn_randmt (void)
 
void bn_randmt_seed (unsigned long seed)
 

Detailed Description

Mersenne Twister random number generation as defined by MT19937.

Generates one pseudorandom real number (double) which is uniformly distributed on [0, 1]-interval, for each call.

Usage:
double d;
bn_randmt_seed(integer_seed);
while (NEED_MORE_RAND_NUMBERS) {
d = bn_randmt();
}
void bn_randmt_seed(unsigned long seed)
double bn_randmt(void)

Function Documentation

◆ bn_randmt()

double bn_randmt ( void  )

◆ bn_randmt_seed()

void bn_randmt_seed ( unsigned long  seed)