MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Attributes | Static Protected Attributes
mds::math::CPseudoRNG Class Reference

Pseudo-Random Number Generator (PRNG) base class. More...

#include <mdsRandom.h>

Inheritance diagram for mds::math::CPseudoRNG:
Inheritance graph
[legend]

List of all members.

Public Types

typedef mds::sys::tInt32 tSeed
 Type of the PRNG seed.

Public Member Functions

void changeSeed (tSeed Seed)
 Changes the PRNG seed.
 CPseudoRNG (tSeed Seed=DEFAULT_SEED)
 Constructor.
double random ()
 Returns random value in the range <0..1).
virtual ~CPseudoRNG ()
 Destructor.

Static Public Attributes

static const tSeed DEFAULT_SEED = 1537
 Default seed.

Protected Attributes

tSeed m_Seed
 Current PRNG seed.

Static Protected Attributes

static const tSeed MAX_VALUE = 0x7fffffff
static const tSeed MULTIPLE_CONST = 1220703125
 Algorithm constants.
static const tSeed SIGN_BIT = 0x80000000

Detailed Description

Pseudo-Random Number Generator (PRNG) base class.


Member Typedef Documentation

typedef mds::sys::tInt32 mds::math::CPseudoRNG::tSeed

Type of the PRNG seed.


Constructor & Destructor Documentation

Constructor.

virtual mds::math::CPseudoRNG::~CPseudoRNG ( ) [virtual]

Destructor.


Member Function Documentation

Changes the PRNG seed.

Returns random value in the range <0..1).


Member Data Documentation

Default seed.

Current PRNG seed.

const tSeed mds::math::CPseudoRNG::MAX_VALUE = 0x7fffffff [static, protected]
const tSeed mds::math::CPseudoRNG::MULTIPLE_CONST = 1220703125 [static, protected]

Algorithm constants.

const tSeed mds::math::CPseudoRNG::SIGN_BIT = 0x80000000 [static, protected]

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