ns3::ExponentialVariableImpl Class Reference

Inheritance diagram for ns3::ExponentialVariableImpl:
Inheritance graph
[legend]
Collaboration diagram for ns3::ExponentialVariableImpl:
Collaboration graph
[legend]

List of all members.

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 RandomVariableBaseCopy (void) const

Static Public Member Functions

static double GetSingleValue (double m, double b=0)

Private Attributes

double m_mean
double m_bound

Detailed Description

Definition at line 592 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 638 of file random-variable.cc.

Referenced by Copy().

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 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.

Parameters:
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.


Member Function Documentation

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]
Parameters:
m The mean of the distribution from which the return value is drawn
b The upper bound value desired, beyond which values get clipped
Returns:
A random number from an exponential distribution with mean m

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]

Member Data Documentation

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

Referenced by GetValue().

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

Referenced by GetValue().


The documentation for this class was generated from the following file:
Generated on Thu Dec 3 14:10:26 2009 for NS-3 by  doxygen 1.6.3