Public Member Functions | Static Public Member Functions

ns3::ParetoVariable Class Reference
[Random Variable Distributions]

ParetoVariable distributed random varThis class supports the creation of objects that return random numbers from a fixed pareto distribution. It also supports the generation of single random numbers from various pareto distributions. More...

#include <random-variable.h>

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

List of all members.

Public Member Functions

 ParetoVariable ()
 ParetoVariable (double m)
 ParetoVariable (double m, double s)
 ParetoVariable (double m, double s, double b)
 Constructs a pareto random variable with the specified mean.

Static Public Member Functions

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

Detailed Description

ParetoVariable distributed random var

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

The probability density function is defined over the range [ $x_m$,+inf) as: $ k \frac{x_m^k}{x^{k+1}}$ where $x_m > 0$ is called the location parameter and $ k > 0$ is called the pareto index or shape.

The parameter $ x_m $ can be infered from the mean and the parameter $ k $ with the equation $ x_m = mean \frac{k-1}{k}, k > 1$.

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

Constructor & Destructor Documentation

ns3::ParetoVariable::ParetoVariable (  ) 

Constructs a pareto random variable with a mean of 1 and a shape parameter of 1.5

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

Constructs a pareto random variable with specified mean and shape parameter of 1.5

Parameters:
m Mean value of the distribution
ns3::ParetoVariable::ParetoVariable ( double  m,
double  s 
)

Constructs a pareto random variable with the specified mean value and shape parameter.

Parameters:
m Mean value of the distribution
s Shape parameter for the distribution
ns3::ParetoVariable::ParetoVariable ( double  m,
double  s,
double  b 
)

Constructs a pareto random variable with the specified mean.

value, shape (alpha), and upper bound. Since pareto 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
s Shape parameter
b Upper limit on returned values

Member Function Documentation

static double ns3::ParetoVariable::GetSingleValue ( double  m,
double  s,
double  b = 0 
) [static]
Parameters:
m The mean value of the distribution from which the return value is drawn.
s The shape parameter of the distribution from which the return value is drawn.
b The upper bound to which to restrict return values
Returns:
A random number from a Pareto distribution with mean m and shape parameter s.

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