Public Member Functions | |
RandomVariableBase () | |
RandomVariableBase (const RandomVariableBase &o) | |
virtual | ~RandomVariableBase () |
virtual double | GetValue ()=0 |
virtual uint32_t | GetInteger () |
virtual RandomVariableBase * | Copy (void) const =0 |
virtual void | GetSeed (uint32_t seed[6]) |
Static Public Member Functions | |
static void | UseDevRandom (bool udr=true) |
static void | UseGlobalSeed (uint32_t s0, uint32_t s1, uint32_t s2, uint32_t s3, uint32_t s4, uint32_t s5) |
static void | SetRunNumber (uint32_t n) |
Static Protected Member Functions | |
static void | Initialize () |
Protected Attributes | |
RngStream * | m_generator |
Static Protected Attributes | |
static unsigned long | heuristic_sequence |
static RngStream * | m_static_generator = 0 |
static uint32_t | runNumber = 0 |
static bool | initialized = false |
Static Private Member Functions | |
static void | GetRandomSeeds (uint32_t seeds[6]) |
Static Private Attributes | |
static bool | useDevRandom = false |
static bool | globalSeedSet = false |
static int | devRandom = -1 |
static uint32_t | globalSeed [6] |
Friends | |
class | RandomVariableInitializer |
Definition at line 48 of file random-variable.cc.
ns3::RandomVariableBase::RandomVariableBase | ( | ) |
Definition at line 108 of file random-variable.cc.
ns3::RandomVariableBase::RandomVariableBase | ( | const RandomVariableBase & | o | ) |
Definition at line 116 of file random-variable.cc.
References m_generator.
ns3::RandomVariableBase::~RandomVariableBase | ( | ) | [virtual] |
Definition at line 125 of file random-variable.cc.
References m_generator.
virtual RandomVariableBase* ns3::RandomVariableBase::Copy | ( | void | ) | const [pure virtual] |
Implemented in ns3::UniformVariableImpl, ns3::ConstantVariableImpl, ns3::SequentialVariableImpl, ns3::ExponentialVariableImpl, ns3::ParetoVariableImpl, ns3::WeibullVariableImpl, ns3::NormalVariableImpl, ns3::EmpiricalVariableImpl, ns3::IntEmpiricalVariableImpl, ns3::DeterministicVariableImpl, ns3::LogNormalVariableImpl, ns3::GammaVariableImpl, ns3::ErlangVariableImpl, and ns3::TriangularVariableImpl.
Referenced by ns3::RandomVariable::operator=().
uint32_t ns3::RandomVariableBase::GetInteger | ( | ) | [virtual] |
Reimplemented in ns3::ConstantVariableImpl, and ns3::IntEmpiricalVariableImpl.
Definition at line 130 of file random-variable.cc.
References GetValue().
Referenced by ns3::RandomVariable::GetInteger().
void ns3::RandomVariableBase::GetRandomSeeds | ( | uint32_t | seeds[6] | ) | [static, private] |
Definition at line 186 of file random-variable.cc.
References ns3::RngStream::CheckSeed(), devRandom, heuristic_sequence, NS_FATAL_ERROR, and useDevRandom.
Referenced by Initialize().
void ns3::RandomVariableBase::GetSeed | ( | uint32_t | seed[6] | ) | [virtual] |
Definition at line 140 of file random-variable.cc.
References ns3::RngStream::GetState(), ns3::RngStream::InitializeStream(), m_generator, ns3::RngStream::ResetNthSubstream(), and runNumber.
Referenced by ns3::RandomVariable::GetSeed().
virtual double ns3::RandomVariableBase::GetValue | ( | ) | [pure virtual] |
Implemented in ns3::UniformVariableImpl, ns3::ConstantVariableImpl, ns3::SequentialVariableImpl, ns3::ExponentialVariableImpl, ns3::ParetoVariableImpl, ns3::WeibullVariableImpl, ns3::NormalVariableImpl, ns3::EmpiricalVariableImpl, ns3::DeterministicVariableImpl, ns3::LogNormalVariableImpl, ns3::GammaVariableImpl, ns3::ErlangVariableImpl, and ns3::TriangularVariableImpl.
Referenced by GetInteger(), and ns3::RandomVariable::GetValue().
void ns3::RandomVariableBase::Initialize | ( | ) | [static, protected] |
Definition at line 174 of file random-variable.cc.
References GetRandomSeeds(), globalSeed, globalSeedSet, initialized, and ns3::RngStream::SetPackageSeed().
Referenced by 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(), and ns3::UniformVariableImpl::GetValue().
void ns3::RandomVariableBase::SetRunNumber | ( | uint32_t | n | ) | [static] |
Definition at line 238 of file random-variable.cc.
References runNumber.
void ns3::RandomVariableBase::UseDevRandom | ( | bool | udr = true |
) | [static] |
Definition at line 135 of file random-variable.cc.
References useDevRandom.
void ns3::RandomVariableBase::UseGlobalSeed | ( | uint32_t | s0, | |
uint32_t | s1, | |||
uint32_t | s2, | |||
uint32_t | s3, | |||
uint32_t | s4, | |||
uint32_t | s5 | |||
) | [static] |
Definition at line 154 of file random-variable.cc.
References ns3::RngStream::CheckSeed(), globalSeed, globalSeedSet, and NS_FATAL_ERROR.
friend class RandomVariableInitializer [friend] |
Definition at line 70 of file random-variable.cc.
int ns3::RandomVariableBase::devRandom = -1 [static, private] |
Definition at line 68 of file random-variable.cc.
Referenced by GetRandomSeeds().
uint32_t ns3::RandomVariableBase::globalSeed [static, private] |
Definition at line 69 of file random-variable.cc.
Referenced by Initialize(), and UseGlobalSeed().
bool ns3::RandomVariableBase::globalSeedSet = false [static, private] |
Definition at line 67 of file random-variable.cc.
Referenced by Initialize(), and UseGlobalSeed().
unsigned long ns3::RandomVariableBase::heuristic_sequence [static, protected] |
Definition at line 72 of file random-variable.cc.
Referenced by GetRandomSeeds().
bool ns3::RandomVariableBase::initialized = false [static, protected] |
Definition at line 76 of file random-variable.cc.
Referenced by 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 Initialize().
RngStream* ns3::RandomVariableBase::m_generator [protected] |
Definition at line 77 of file random-variable.cc.
Referenced by 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(), ns3::UniformVariableImpl::GetValue(), RandomVariableBase(), and ~RandomVariableBase().
RngStream * ns3::RandomVariableBase::m_static_generator = 0 [static, protected] |
Definition at line 73 of file random-variable.cc.
Referenced by 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(), and ns3::RandomVariableInitializer::~RandomVariableInitializer().
uint32_t ns3::RandomVariableBase::runNumber = 0 [static, protected] |
Definition at line 74 of file random-variable.cc.
Referenced by 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(), ns3::UniformVariableImpl::GetValue(), and SetRunNumber().
bool ns3::RandomVariableBase::useDevRandom = false [static, private] |
Definition at line 66 of file random-variable.cc.
Referenced by GetRandomSeeds(), and UseDevRandom().