Combined Multiple-Recursive Generator MRG32k3a. More...
#include <rng-stream.h>
Public Member Functions | |
RngStream () | |
RngStream (const RngStream &) | |
void | InitializeStream () |
void | ResetStartStream () |
void | ResetStartSubstream () |
void | ResetNextSubstream () |
void | ResetNthSubstream (uint32_t N) |
void | SetAntithetic (bool a) |
void | IncreasedPrecis (bool incp) |
bool | SetSeeds (const uint32_t seed[6]) |
void | AdvanceState (int32_t e, int32_t c) |
void | GetState (uint32_t seed[6]) const |
double | RandU01 () |
int32_t | RandInt (int32_t i, int32_t j) |
Static Public Member Functions | |
static bool | SetPackageSeed (const uint32_t seed[6]) |
static bool | CheckSeed (const uint32_t seed[6]) |
Private Member Functions | |
double | U01 () |
double | U01d () |
Private Attributes | |
double | Cg [6] |
double | Bg [6] |
double | Ig [6] |
bool | anti |
bool | incPrec |
Static Private Attributes | |
static double | nextSeed [6] |
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 39 of file rng-stream.h.
ns3::RngStream::RngStream | ( | ) |
Definition at line 312 of file rng-stream.cc.
ns3::RngStream::RngStream | ( | const RngStream & | r | ) |
void ns3::RngStream::AdvanceState | ( | int32_t | e, | |
int32_t | c | |||
) |
Definition at line 421 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::A1p0, anonymous_namespace{rng-stream.cc}::A2p0, Cg, anonymous_namespace{rng-stream.cc}::InvA1, anonymous_namespace{rng-stream.cc}::InvA2, anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, anonymous_namespace{rng-stream.cc}::MatMatModM(), anonymous_namespace{rng-stream.cc}::MatPowModM(), anonymous_namespace{rng-stream.cc}::MatTwoPowModM(), and anonymous_namespace{rng-stream.cc}::MatVecModM().
bool ns3::RngStream::CheckSeed | ( | const uint32_t | seed[6] | ) | [static] |
Definition at line 258 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::m1, and anonymous_namespace{rng-stream.cc}::m2.
Referenced by ns3::RandomVariableBase::GetRandomSeeds(), SetPackageSeed(), SetSeeds(), and ns3::RandomVariableBase::UseGlobalSeed().
void ns3::RngStream::GetState | ( | uint32_t | seed[6] | ) | const |
Definition at line 452 of file rng-stream.cc.
References Cg.
Referenced by ns3::RandomVariableBase::GetSeed().
void ns3::RngStream::IncreasedPrecis | ( | bool | incp | ) |
Definition at line 460 of file rng-stream.cc.
References incPrec.
void ns3::RngStream::InitializeStream | ( | ) |
Definition at line 331 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::A1p127, anonymous_namespace{rng-stream.cc}::A2p127, Bg, Cg, Ig, anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, anonymous_namespace{rng-stream.cc}::MatVecModM(), and nextSeed.
Referenced by ns3::RandomVariableBase::GetSeed(), ns3::TriangularVariableImpl::GetSingleValue(), ns3::ErlangVariableImpl::GetSingleValue(), ns3::GammaVariableImpl::GetSingleValue(), ns3::LogNormalVariableImpl::GetSingleValue(), ns3::NormalVariableImpl::GetSingleValue(), ns3::WeibullVariableImpl::GetSingleValue(), ns3::ParetoVariableImpl::GetSingleValue(), ns3::ExponentialVariableImpl::GetSingleValue(), ns3::UniformVariableImpl::GetSingleValue(), ns3::TriangularVariableImpl::GetValue(), ns3::ErlangVariableImpl::GetValue(), ns3::GammaVariableImpl::GetValue(), ns3::LogNormalVariableImpl::GetValue(), ns3::EmpiricalVariableImpl::GetValue(), ns3::NormalVariableImpl::GetValue(), ns3::WeibullVariableImpl::GetValue(), ns3::ParetoVariableImpl::GetValue(), ns3::ExponentialVariableImpl::GetValue(), ns3::UniformVariableImpl::GetValue(), and ns3::RealRandomStream::RealRandomStream().
int32_t ns3::RngStream::RandInt | ( | int32_t | i, | |
int32_t | j | |||
) |
Definition at line 488 of file rng-stream.cc.
References RandU01().
Referenced by ns3::RealRandomStream::GetNext().
double ns3::RngStream::RandU01 | ( | ) |
Definition at line 476 of file rng-stream.cc.
References incPrec, U01(), and U01d().
Referenced by ns3::TriangularVariableImpl::GetSingleValue(), ns3::GammaVariableImpl::GetSingleValue(), ns3::LogNormalVariableImpl::GetSingleValue(), ns3::NormalVariableImpl::GetSingleValue(), ns3::WeibullVariableImpl::GetSingleValue(), ns3::ParetoVariableImpl::GetSingleValue(), ns3::ExponentialVariableImpl::GetSingleValue(), ns3::UniformVariableImpl::GetSingleValue(), ns3::TriangularVariableImpl::GetValue(), ns3::GammaVariableImpl::GetValue(), ns3::LogNormalVariableImpl::GetValue(), ns3::EmpiricalVariableImpl::GetValue(), ns3::NormalVariableImpl::GetValue(), ns3::WeibullVariableImpl::GetValue(), ns3::ParetoVariableImpl::GetValue(), ns3::ExponentialVariableImpl::GetValue(), ns3::UniformVariableImpl::GetValue(), and RandInt().
void ns3::RngStream::ResetNextSubstream | ( | ) |
Definition at line 373 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::A1p76, anonymous_namespace{rng-stream.cc}::A2p76, Bg, Cg, anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, and anonymous_namespace{rng-stream.cc}::MatVecModM().
void ns3::RngStream::ResetNthSubstream | ( | uint32_t | N | ) |
Definition at line 384 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::A1p76, anonymous_namespace{rng-stream.cc}::A2p76, Bg, Cg, anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, and anonymous_namespace{rng-stream.cc}::MatVecModM().
Referenced by ns3::RandomVariableBase::GetSeed(), ns3::TriangularVariableImpl::GetValue(), ns3::ErlangVariableImpl::GetValue(), ns3::GammaVariableImpl::GetValue(), ns3::LogNormalVariableImpl::GetValue(), ns3::EmpiricalVariableImpl::GetValue(), ns3::NormalVariableImpl::GetValue(), ns3::WeibullVariableImpl::GetValue(), ns3::ParetoVariableImpl::GetValue(), ns3::ExponentialVariableImpl::GetValue(), and ns3::UniformVariableImpl::GetValue().
void ns3::RngStream::ResetStartStream | ( | ) |
Definition at line 353 of file rng-stream.cc.
void ns3::RngStream::ResetStartSubstream | ( | ) |
Definition at line 363 of file rng-stream.cc.
void ns3::RngStream::SetAntithetic | ( | bool | a | ) |
Definition at line 467 of file rng-stream.cc.
References anti.
bool ns3::RngStream::SetPackageSeed | ( | const uint32_t | seed[6] | ) | [static] |
Definition at line 396 of file rng-stream.cc.
References CheckSeed(), and nextSeed.
Referenced by ns3::RandomVariableBase::Initialize().
bool ns3::RngStream::SetSeeds | ( | const uint32_t | seed[6] | ) |
Definition at line 406 of file rng-stream.cc.
References Bg, Cg, CheckSeed(), and Ig.
double ns3::RngStream::U01 | ( | ) | [private] |
Definition at line 211 of file rng-stream.cc.
References anonymous_namespace{rng-stream.cc}::a12, anonymous_namespace{rng-stream.cc}::a13n, anonymous_namespace{rng-stream.cc}::a21, anonymous_namespace{rng-stream.cc}::a23n, anti, Cg, anonymous_namespace{rng-stream.cc}::m1, anonymous_namespace{rng-stream.cc}::m2, and anonymous_namespace{rng-stream.cc}::norm.
double ns3::RngStream::U01d | ( | ) | [private] |
Definition at line 240 of file rng-stream.cc.
References anti, anonymous_namespace{rng-stream.cc}::fact, and U01().
Referenced by RandU01().
bool ns3::RngStream::anti [private] |
Definition at line 60 of file rng-stream.h.
Referenced by RngStream(), SetAntithetic(), U01(), and U01d().
double ns3::RngStream::Bg[6] [private] |
Definition at line 59 of file rng-stream.h.
Referenced by InitializeStream(), ResetNextSubstream(), ResetNthSubstream(), ResetStartStream(), ResetStartSubstream(), RngStream(), and SetSeeds().
double ns3::RngStream::Cg[6] [private] |
Definition at line 59 of file rng-stream.h.
Referenced by AdvanceState(), GetState(), InitializeStream(), ResetNextSubstream(), ResetNthSubstream(), ResetStartStream(), ResetStartSubstream(), RngStream(), SetSeeds(), and U01().
double ns3::RngStream::Ig[6] [private] |
Definition at line 59 of file rng-stream.h.
Referenced by InitializeStream(), ResetStartStream(), RngStream(), and SetSeeds().
bool ns3::RngStream::incPrec [private] |
Definition at line 60 of file rng-stream.h.
Referenced by IncreasedPrecis(), RandU01(), and RngStream().
double ns3::RngStream::nextSeed [static, private] |
{ 12345.0, 12345.0, 12345.0, 12345.0, 12345.0, 12345.0 }
Definition at line 64 of file rng-stream.h.
Referenced by InitializeStream(), and SetPackageSeed().