OMNeT++ Simulation Library  6.0.3
cMersenneTwister Class Reference

#include <cmersennetwister.h>

Description

Wraps the Mersenne Twister RNG by Makoto Matsumoto and Takuji Nishimura.

Mersenne Twister has a cycle length is 2^19937-1, and 623-dimensional equidistribution property is assured.

http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/ewhat-is-mt.html

Actual code used is MersenneTwister.h from Richard J. Wagner, v1.0, 15 May 2003, rjwag.nosp@m.ner@.nosp@m.write.nosp@m.me.c.nosp@m.om.

http://www-personal.engin.umich.edu/~wagnerr/MersenneTwister.html

Inheritance diagram for cMersenneTwister:
cRNG cObject

Public Member Functions

virtual void initialize (int seedSet, int rngId, int numRngs, int parsimProcId, int parsimNumPartitions, cConfiguration *cfg) override
 
virtual void selfTest () override
 
virtual uint32_t intRand () override
 
virtual uint32_t intRandMax () override
 
virtual uint32_t intRand (uint32_t n) override
 
virtual double doubleRand () override
 
virtual double doubleRandNonz () override
 
virtual double doubleRandIncl1 () override
 
- Public Member Functions inherited from cRNG
virtual uint64_t getNumbersDrawn () const
 
double doubleRandNonzIncl1 ()
 
- Public Member Functions inherited from cObject
 cObject ()
 
 cObject (const cObject &other)=default
 
virtual ~cObject ()
 
virtual const char * getClassName () const
 
virtual const char * getName () const
 
bool isName (const char *s) const
 
virtual const char * getFullName () const
 
virtual std::string getFullPath () const
 
virtual std::string getClassAndFullName () const
 
virtual std::string getClassAndFullPath () const
 
const cObjectgetThisPtr () const
 
virtual std::string str () const
 
virtual std::ostream & printOn (std::ostream &os) const
 
virtual cObjectdup () const
 
virtual void parsimPack (cCommBuffer *buffer) const
 
virtual void parsimUnpack (cCommBuffer *buffer)
 
virtual cObjectgetOwner () const
 
virtual bool isOwnedObject () const
 
virtual bool isSoftOwner () const
 
virtual void forEachChild (cVisitor *v)
 
cObjectfindObject (const char *name, bool deep=true)
 
virtual cClassDescriptorgetDescriptor () const
 
void copyNotSupported () const
 

Additional Inherited Members

- Protected Member Functions inherited from cObject
virtual void take (cOwnedObject *obj)
 
virtual void drop (cOwnedObject *obj)
 
void dropAndDelete (cOwnedObject *obj)
 

Member Function Documentation

◆ initialize()

virtual void initialize ( int  seedSet,
int  rngId,
int  numRngs,
int  parsimProcId,
int  parsimNumPartitions,
cConfiguration cfg 
)
overridevirtual

Sets up the RNG.

Implements cRNG.

◆ selfTest()

virtual void selfTest ( )
overridevirtual

Tests correctness of the RNG

Implements cRNG.

◆ intRand() [1/2]

virtual uint32_t intRand ( )
overridevirtual

Random integer in the range [0,intRandMax()]

Implements cRNG.

◆ intRandMax()

virtual uint32_t intRandMax ( )
overridevirtual

Maximum value that can be returned by intRand()

Implements cRNG.

◆ intRand() [2/2]

virtual uint32_t intRand ( uint32_t  n)
overridevirtual

Random integer in [0,n), n < intRandMax()

Implements cRNG.

◆ doubleRand()

virtual double doubleRand ( )
overridevirtual

Random double on the [0,1) interval

Implements cRNG.

◆ doubleRandNonz()

virtual double doubleRandNonz ( )
overridevirtual

Random double on the (0,1) interval

Implements cRNG.

◆ doubleRandIncl1()

virtual double doubleRandIncl1 ( )
overridevirtual

Random double on the [0,1] interval

Implements cRNG.


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