Public Member Functions | |
ExponentialVariableImpl () | |
ExponentialVariableImpl (double m) | |
Constructs an exponential random variable with a specified mean. | |
ExponentialVariableImpl (double m, double b) | |
Constructs an exponential random variable with spefified. | |
ExponentialVariableImpl (const ExponentialVariableImpl &c) | |
virtual double | GetValue () |
virtual RandomVariableBase * | Copy (void) const |
Static Public Member Functions | |
static double | GetSingleValue (double m, double b=0) |
Private Attributes | |
double | m_mean |
double | m_bound |
Definition at line 592 of file random-variable.cc.
ns3::ExponentialVariableImpl::ExponentialVariableImpl | ( | ) |
Constructs an exponential random variable with a mean value of 1.0.
Definition at line 638 of file random-variable.cc.
Referenced by Copy().
ns3::ExponentialVariableImpl::ExponentialVariableImpl | ( | double | m | ) | [explicit] |
Constructs an exponential random variable with a specified mean.
m | Mean value for the random variable |
Definition at line 641 of file random-variable.cc.
ns3::ExponentialVariableImpl::ExponentialVariableImpl | ( | double | m, | |
double | b | |||
) |
Constructs an exponential random variable with spefified.
mean and upper limit. Since exponential distributions can theoretically return unbounded values, it is sometimes useful to specify a fixed upper limit. Note however when the upper limit is specified, the true mean of the distribution is slightly smaller than the mean value specified.
m | Mean value of the random variable | |
b | Upper bound on returned values |
Definition at line 644 of file random-variable.cc.
ns3::ExponentialVariableImpl::ExponentialVariableImpl | ( | const ExponentialVariableImpl & | c | ) |
Definition at line 647 of file random-variable.cc.
RandomVariableBase * ns3::ExponentialVariableImpl::Copy | ( | void | ) | const [virtual] |
Implements ns3::RandomVariableBase.
Definition at line 667 of file random-variable.cc.
References ExponentialVariableImpl().
double ns3::ExponentialVariableImpl::GetSingleValue | ( | double | m, | |
double | b = 0 | |||
) | [static] |
m | The mean of the distribution from which the return value is drawn | |
b | The upper bound value desired, beyond which values get clipped |
Definition at line 671 of file random-variable.cc.
References ns3::RandomVariableBase::Initialize(), ns3::RngStream::InitializeStream(), ns3::RandomVariableBase::m_static_generator, and ns3::RngStream::RandU01().
double ns3::ExponentialVariableImpl::GetValue | ( | ) | [virtual] |
Implements ns3::RandomVariableBase.
Definition at line 650 of file random-variable.cc.
References ns3::RandomVariableBase::Initialize(), ns3::RandomVariableBase::initialized, ns3::RngStream::InitializeStream(), m_bound, ns3::RandomVariableBase::m_generator, m_mean, ns3::RngStream::RandU01(), ns3::RngStream::ResetNthSubstream(), and ns3::RandomVariableBase::runNumber.
double ns3::ExponentialVariableImpl::m_bound [private] |
Definition at line 635 of file random-variable.cc.
Referenced by GetValue().
double ns3::ExponentialVariableImpl::m_mean [private] |
Definition at line 634 of file random-variable.cc.
Referenced by GetValue().