A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ns3::NormalVariable Class Reference

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. More...

#include <random-variable.h>

+ Inheritance diagram for ns3::NormalVariable:

Public Member Functions

 NormalVariable ()
 
 NormalVariable (double m, double v)
 Construct a normal random variable with specified mean and variance. More...
 
 NormalVariable (double m, double v, double b)
 Construct a normal random variable with specified mean and variance. More...
 
- Public Member Functions inherited from ns3::RandomVariable
 RandomVariable (const RandomVariable &o)
 
uint32_t GetInteger (void) const
 Returns a random integer integer from the underlying distribution. More...
 
double GetValue (void) const
 Returns a random double from the underlying distribution. More...
 
RandomVariableoperator= (const RandomVariable &o)
 

Additional Inherited Members

- Protected Member Functions inherited from ns3::RandomVariable
 RandomVariable (const RandomVariableBase &variable)
 
RandomVariableBasePeek (void) const
 

Detailed Description

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.

The density probability function is defined over the interval (-inf,+inf) as: $ \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{s\sigma^2}}$ where $ mean = \mu $ and $ variance = \sigma^2 $

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

Constructor & Destructor Documentation

ns3::NormalVariable::NormalVariable ( )

Constructs an normal random variable with a mean value of 0 and variance of 1.

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

References NS_LOG_FUNCTION.

ns3::NormalVariable::NormalVariable ( double  m,
double  v 
)

Construct a normal random variable with specified mean and variance.

Parameters
mMean value
vVariance

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

References NS_LOG_FUNCTION.

ns3::NormalVariable::NormalVariable ( double  m,
double  v,
double  b 
)

Construct a normal random variable with specified mean and variance.

Parameters
mMean value
vVariance
bBound. The NormalVariable is bounded symmetrically about the mean [mean-bound,mean+bound]

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

References NS_LOG_FUNCTION.


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