22 #ifndef NS3_RANDOM_VARIABLE_H
23 #define NS3_RANDOM_VARIABLE_H
30 #include "attribute.h"
31 #include "attribute-helper.h"
32 #include "rng-seed-manager.h"
42 class RandomVariableBase;
79 friend std::ostream & operator << (std::ostream &os,
const RandomVariable &var);
80 friend std::istream & operator >> (std::istream &os,
RandomVariable &var);
136 double GetValue (
double s,
double l);
476 void CDF (
double v,
double c);
600 double GetValue (
double alpha,
double beta)
const;
653 double GetValue (
unsigned int k,
double lambda)
const;
std::istream & operator>>(std::istream &is, Angles &a)
A random variable that returns a constantClass ConstantVariable defines a random number generator tha...
Triangularly Distributed random varThis distribution is a triangular distribution. The probability density is in the shape of a triangle.
Erlang Distributed Random VariableErlangVariable defines a random variable with Erlang distribution...
Zipf Distributed Random VariableZipfVariable defines a discrete random variable with Zipf distributio...
ParetoVariable distributed random varThis class supports the creation of objects that return random n...
Class NormalVariable defines a random variable with a normal (Gaussian) distribution.This class supports the creation of objects that return random numbers from a fixed normal distribution. It also supports the generation of single random numbers from various normal distributions.
DeterministicVariable(double *d, uint32_t c)
Constructor.
double GetValue(void) const
call RandomVariable::GetValue
Log-normal Distributed random varLogNormalVariable defines a random variable with log-normal distribu...
SequentialVariable(double f, double l, double i=1, uint32_t c=1)
Constructor for the SequentialVariable RNG.
Gamma Distributed Random VariableGammaVariable defines a random variable with gamma distribution...
std::ostream & operator<<(std::ostream &os, const Angles &a)
LogNormalVariable(double mu, double sigma)
Zeta Distributed Distributed Random VariableZetaVariable defines a discrete random variable with Zeta...
#define ATTRIBUTE_CHECKER_DEFINE(type)
Exponentially Distributed random varThis class supports the creation of objects that return random nu...
#define ATTRIBUTE_VALUE_DEFINE(type)
double GetValue(void) const
call RandomVariable::GetValue
Integer-based empirical distributionDefines an empirical distribution where all values are integers...
a non-random variableDefines a random variable that has a specified, predetermined sequence...
void CDF(double v, double c)
Specifies a point in the empirical distribution.
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
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 probability, and the return value is interpreted linearly between the two appropriate points in the CDF. The method is known as inverse transform sampling: (http://en.wikipedia.org/wiki/Inverse_transform_sampling).
The basic RNG for NS-3.Note: The underlying random number generation method used by NS-3 is the RngSt...
double GetValue(void) const
Returns a random double from the underlying distribution.
uint32_t GetInteger(void) const
Returns a random integer integer from the underlying distribution.
WeibullVariable distributed random varThis class supports the creation of objects that return random ...
void SetConstant(double c)
Specify a new constant RNG for this generator.
ParetoVariable()
Constructs a pareto random variable with a mean of 1 and a shape parameter of 1.5.
Return a sequential list of valuesClass SequentialVariable defines a random number generator that ret...