|
ns-3
|
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>


Public Member Functions | |
| ParetoVariable () | |
| Constructs a pareto random variable with a mean of 1 and a shape parameter of 1.5. | |
| ParetoVariable (double m) | |
| Constructs a pareto random variable with specified mean and shape parameter of 1.5. | |
| ParetoVariable (double m, double s) | |
| Constructs a pareto random variable with the specified mean value and shape parameter. Beware, s must be strictly greater than 1. | |
| ParetoVariable (double m, double s, double b) | |
| Constructs a pareto random variable with the specified mean value, shape (alpha), and upper bound. Beware, s must be strictly greater than 1. | |
| ParetoVariable (std::pair< double, double > params) | |
| Constructs a pareto random variable with the specified scale and shape parameters. | |
| ParetoVariable (std::pair< double, double > params, double b) | |
| Constructs a pareto random variable with the specified scale, shape (alpha), and upper bound. | |
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 [
,+inf) as:
where
is called the location parameter and
is called the pareto index or shape.
The parameter
can be infered from the mean and the parameter
with the equation
.
ParetoVariable x (3.14); x.GetValue (); //will always return with mean 3.14
| ns3::ParetoVariable::ParetoVariable | ( | double | m | ) | [explicit] |
Constructs a pareto random variable with specified mean and shape parameter of 1.5.
| 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. Beware, s must be strictly greater than 1.
| 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. Beware, s must be strictly greater than 1.
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.
| m | Mean value |
| s | Shape parameter |
| b | Upper limit on returned values |
| ns3::ParetoVariable::ParetoVariable | ( | std::pair< double, double > | params | ) |
Constructs a pareto random variable with the specified scale and shape parameters.
| params | the two parameters, respectively scale and shape, of the distribution |
| ns3::ParetoVariable::ParetoVariable | ( | std::pair< double, double > | params, |
| double | b | ||
| ) |
Constructs a pareto random variable with the specified scale, 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.
| params | the two parameters, respectively scale and shape, of the distribution |
| b | Upper limit on returned values |