Nori

Random Class Reference

Mersenne Twister: pseudorandom number generator based on a twisted generalized feedback shift register. More...

#include <random.h>

List of all members.

Public Member Functions

 Random ()
 Create an uninitialized instance.
void seed (uint32_t value)
 Seed the RNG with the specified seed value.
void seed (uint32_t *values, int length)
 Seed the RNG with an entire array.
void seed (Random *random)
 Seed the RNG using an existing instance.
uint32_t nextUInt ()
 Generate an uniformly distributed 32-bit integer.
float nextFloat ()
 Generate an uniformly distributed single precision value on [0,1)

Detailed Description

Mersenne Twister: pseudorandom number generator based on a twisted generalized feedback shift register.

Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved.

Definition at line 40 of file random.h.


Constructor & Destructor Documentation

Random::Random ( )

Create an uninitialized instance.


Member Function Documentation

float Random::nextFloat ( )

Generate an uniformly distributed single precision value on [0,1)

uint32_t Random::nextUInt ( )

Generate an uniformly distributed 32-bit integer.

void Random::seed ( uint32_t *  values,
int  length 
)

Seed the RNG with an entire array.

void Random::seed ( Random random)

Seed the RNG using an existing instance.

void Random::seed ( uint32_t  value)

Seed the RNG with the specified seed value.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines