EmpiricalVariable distribution random varDefines a random variable that has a specified, empirical distribution. The distribution is specified by a series of calls to the CDF member function, specifying a value and the probability that the function value is less than the specified value. When values are requested, a uniform random variable is used to select a probabililty, and the return value is interpreted linerarly between the two appropriate points in the CDF. The method is known as inverse transform sampling: (http://en.wikipedia.org/wiki/Inverse_transform_sampling). More...
#include <random-variable.h>
Public Member Functions | |
EmpiricalVariable () | |
void | CDF (double v, double c) |
Specifies a point in the empirical distribution. | |
Protected Member Functions | |
EmpiricalVariable (const RandomVariableBase &variable) |
EmpiricalVariable distribution random var
Defines a random variable that has a specified, empirical distribution. The distribution is specified by a series of calls to the CDF member function, specifying a value and the probability that the function value is less than the specified value. When values are requested, a uniform random variable is used to select a probabililty, and the return value is interpreted linerarly between the two appropriate points in the CDF. The method is known as inverse transform sampling: (http://en.wikipedia.org/wiki/Inverse_transform_sampling).
Definition at line 547 of file random-variable.h.
ns3::EmpiricalVariable::EmpiricalVariable | ( | ) | [explicit] |
Constructor for the EmpiricalVariable random variables.
Definition at line 1273 of file random-variable.cc.
ns3::EmpiricalVariable::EmpiricalVariable | ( | const RandomVariableBase & | variable | ) | [protected] |
Definition at line 1276 of file random-variable.cc.
void ns3::EmpiricalVariable::CDF | ( | double | v, | |
double | c | |||
) |
Specifies a point in the empirical distribution.
v | The function value for this point | |
c | Probability that the function is less than or equal to v |
Definition at line 1280 of file random-variable.cc.
References ns3::EmpiricalVariableImpl::CDF(), NS_ASSERT, and ns3::RandomVariable::Peek().