ns3::RandomVariable Class Reference
[Random Variable Distributions]

The basic RNG for NS-3.

Note: The underlying random number generation method used by NS-3 is the RngStream code by Pierre L'Ecuyer at the University of Montreal. More...

#include <random-variable.h>

Inheritance diagram for ns3::RandomVariable:

Inheritance graph
[legend]

List of all members.

Public Member Functions

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.


Detailed Description

The basic RNG for NS-3.

Note: The underlying random number generation method used by NS-3 is the RngStream code by Pierre L'Ecuyer at the University of Montreal.

NS-3 has a rich set of random number generators. Class RandomVariable defines the base class functionalty required for all random number generators. By default, the underlying generator is seeded all the time with the same seed value and run number coming from the ns3::GlobalValue RngSeed and RngRun.


Member Function Documentation

uint32_t ns3::RandomVariable::GetInteger ( void   )  const

Returns a random integer integer from the underlying distribution.

Returns:
Integer cast of GetValue()

double ns3::RandomVariable::GetValue ( void   )  const

Returns a random double from the underlying distribution.

Returns:
A floating point random value

Reimplemented in ns3::UniformVariable, ns3::GammaVariable, and ns3::ErlangVariable.


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

Generated on Fri Apr 9 15:01:09 2010 for NS-3 by  doxygen 1.5.8