A Discrete-Event Network Simulator Home Tutorials  ▼ Docs    ▼ Develop ▼ API
ns3::ExponentialVariableImpl Class Reference
Inheritance diagram for ns3::ExponentialVariableImpl:

## Public Member Functions

ExponentialVariableImpl ()

ExponentialVariableImpl (double m)
Constructs an exponential random variable with a specified mean. More...

ExponentialVariableImpl (double m, double b)
Constructs an exponential random variable with specified mean and upper limit. More...

ExponentialVariableImpl (const ExponentialVariableImpl &c)

virtual RandomVariableBaseCopy (void) const

virtual double GetValue ()

Public Member Functions inherited from ns3::RandomVariableBase
RandomVariableBase (const RandomVariableBase &o)

virtual uint32_t GetInteger ()

RngStreamGetStream (void)

double m_bound

double m_mean

## Detailed Description

Definition at line 516 of file random-variable.cc.

## Constructor & Destructor Documentation

 ns3::ExponentialVariableImpl::ExponentialVariableImpl ( )

Constructs an exponential random variable with a mean value of 1.0.

Definition at line 558 of file random-variable.cc.

References NS_LOG_FUNCTION.

 ns3::ExponentialVariableImpl::ExponentialVariableImpl ( double m )
explicit

Constructs an exponential random variable with a specified mean.

Parameters
 m Mean value for the random variable

Definition at line 565 of file random-variable.cc.

References NS_LOG_FUNCTION.

 ns3::ExponentialVariableImpl::ExponentialVariableImpl ( double m, double b )

Constructs an exponential random variable with specified 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: .

Parameters
 m Mean value of the random variable b Upper bound on returned values

Definition at line 572 of file random-variable.cc.

References NS_LOG_FUNCTION.

## Member Function Documentation

 double ns3::ExponentialVariableImpl::GetValue ( void )
virtual
Returns
A random value from this exponential distribution

Implements ns3::RandomVariableBase.

Definition at line 587 of file random-variable.cc.

References NS_LOG_FUNCTION, and ns3::RngStream::RandU01().

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