A Discrete-Event Network Simulator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::RngStream Class Reference

Combined Multiple-Recursive Generator MRG32k3a. More...

#include <rng-stream.h>

Public Member Functions

 RngStream (uint32_t seed, uint64_t stream, uint64_t substream)
 RngStream (const RngStream &)
double RandU01 (void)
 Generate the next random number for this stream. More...

Private Member Functions

void AdvanceNthBy (uint64_t nth, int by, double state[6])

Private Attributes

double m_currentState [6]

Detailed Description

Combined Multiple-Recursive Generator MRG32k3a.

This class is the combined multiple-recursive random number generator called MRG32k3a. The ns3::RandomVariableBase class holds a static instance of this class. The details of this class are explained in: http://www.iro.umontreal.ca/~lecuyer/myftp/papers/streams00.pdf

Definition at line 38 of file rng-stream.h.

Constructor & Destructor Documentation

ns3::RngStream::RngStream ( uint32_t  seed,
uint64_t  stream,
uint64_t  substream 

Definition at line 280 of file rng-stream.cc.

References AdvanceNthBy(), anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, m_currentState, and NS_FATAL_ERROR.

+ Here is the call graph for this function:

ns3::RngStream::RngStream ( const RngStream r)

Definition at line 294 of file rng-stream.cc.

References m_currentState.

Member Function Documentation

void ns3::RngStream::AdvanceNthBy ( uint64_t  nth,
int  by,
double  state[6] 

Definition at line 303 of file rng-stream.cc.

References anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, anonymous_namespace{rng-stream.cc}::MatVecModM(), and anonymous_namespace{rng-stream.cc}::PowerOfTwoMatrix().

Referenced by RngStream().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::RngStream::RandU01 ( void  )

Member Data Documentation

double ns3::RngStream::m_currentState[6]

Definition at line 52 of file rng-stream.h.

Referenced by RandU01(), and RngStream().

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