ns3::ErlangVariable Class Reference
[Random Variable Distributions]

Erlang Distributed Random VariableErlangVariable defines a random variable with Erlang distribution. More...

#include <random-variable.h>

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

List of all members.

Public Member Functions

 ErlangVariable (double k, double lambda)

Static Public Member Functions

static double GetSingleValue (double k, double lambda)

Detailed Description

Erlang Distributed Random Variable

ErlangVariable defines a random variable with Erlang distribution.

The Erlang distribution is a special case of the Gamma distribution where k (= alpha) is a non-negative integer. Erlang distributed variables can be generated using a much faster algorithm than gamma variables.

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

The probability density function is defined over the interval [0,+inf) as: $ \frac{x^{k-1} e^{-\frac{x}{\lambda}}}{\lambda^k (k-1)!}$ where $ mean = k \lambda $ and $ variance = k \lambda^2$

Definition at line 695 of file random-variable.h.


Constructor & Destructor Documentation

ns3::ErlangVariable::ErlangVariable ( double  k,
double  lambda 
)
Parameters:
k k parameter of the Erlang distribution. Must be a non-negative integer.
lambda lambda parameter of the Erlang distribution

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


Member Function Documentation

double ns3::ErlangVariable::GetSingleValue ( double  k,
double  lambda 
) [static]
Parameters:
k k parameter of the underlying Erlang distribution. Must be a non-negative integer.
lambda lambda parameter of the underlying Erlang distribution
Returns:
A random number from the distribution specified by k and lambda

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

Referenced by ns3::NakagamiPropagationLossModel::DoCalcRxPower().


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