ns3::ExponentialVariable Class Reference
[Random Variable Distributions]

Exponentially Distributed random var

This class supports the creation of objects that return random numbers from a fixed exponential distribution. It also supports the generation of single random numbers from various exponential distributions. More...

#include <random-variable.h>

Inheritance diagram for ns3::ExponentialVariable:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExponentialVariable ()
 ExponentialVariable (double m)
 Constructs an exponential random variable with a specified mean.
 ExponentialVariable (double m, double b)
 Constructs an exponential random variable with spefified.


Detailed Description

Exponentially Distributed random var

This class supports the creation of objects that return random numbers from a fixed exponential distribution. It also supports the generation of single random numbers from various exponential distributions.

The probability density function of an exponential variable is defined over the interval [0, +inf) as: $ \alpha e^{-\alpha x} $ where $ \alpha = \frac{1}{mean} $

The bounded version is defined over the internal [0,+inf) as: $ \left\{ \begin{array}{cl} \alpha e^{-\alpha x} & x < bound \\ bound & x > bound \end{array}\right. $

 ExponentialVariable x(3.14);
 x.GetValue();  //will always return with mean 3.14
 ExponentialVariable::GetSingleValue(20.1); //returns with mean 20.1
 ExponentialVariable::GetSingleValue(108); //returns with mean 108

Constructor & Destructor Documentation

ns3::ExponentialVariable::ExponentialVariable (  ) 

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

ns3::ExponentialVariable::ExponentialVariable ( double  m  )  [explicit]

Constructs an exponential random variable with a specified mean.

Parameters:
m Mean value for the random variable

ns3::ExponentialVariable::ExponentialVariable ( 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


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

Generated on Fri Apr 9 15:01:09 2010 for NS-3 by  doxygen 1.5.8