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>
List of all members.
Public Member Functions |
| NormalVariable () |
| NormalVariable (double m, double v) |
| Construct a normal random variable with specified mean and variance.
|
| NormalVariable (double m, double v, double b) |
| Construct a normal random variable with specified mean and variance.
|
Static Public Member Functions |
static double | GetSingleValue (double m, double v) |
static double | GetSingleValue (double m, double v, double b) |
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:
where
and
Constructor & Destructor Documentation
ns3::NormalVariable::NormalVariable |
( |
|
) |
|
Constructs an normal random variable with a mean value of 0 and variance of 1.
ns3::NormalVariable::NormalVariable |
( |
double |
m, |
|
|
double |
v | |
|
) |
| | |
Construct a normal random variable with specified mean and variance.
- Parameters:
-
ns3::NormalVariable::NormalVariable |
( |
double |
m, |
|
|
double |
v, |
|
|
double |
b | |
|
) |
| | |
Construct a normal random variable with specified mean and variance.
- Parameters:
-
| m | Mean value |
| v | Variance |
| b | Bound. The NormalVariable is bounded symetrically about the mean [mean-bound,mean+bound] |
Member Function Documentation
static double ns3::NormalVariable::GetSingleValue |
( |
double |
m, |
|
|
double |
v | |
|
) |
| | [static] |
- Parameters:
-
- Returns:
- A random number from a distribution specified by m, and v.
static double ns3::NormalVariable::GetSingleValue |
( |
double |
m, |
|
|
double |
v, |
|
|
double |
b | |
|
) |
| | [static] |
- Parameters:
-
| m | Mean value |
| v | Variance |
| b | Bound. The NormalVariable is bounded symetrically about the mean [mean-bound,mean+bound] |
- Returns:
- A random number from a distribution specified by m,v, and b.
The documentation for this class was generated from the following file:
- src/core/random-variable.h