ns-3
ns3::DeterministicVariable Class Reference

a non-random variableDefines a random variable that has a specified, predetermined sequence. This would be useful when trying to force the RNG to return a known sequence, perhaps to compare NS-3 to some other simulator More...

#include <random-variable.h>

Inheritance diagram for ns3::DeterministicVariable:
Collaboration diagram for ns3::DeterministicVariable:

List of all members.

Public Member Functions

 DeterministicVariable (double *d, uint32_t c)
 Constructor.

Detailed Description

a non-random variable

Defines a random variable that has a specified, predetermined sequence. This would be useful when trying to force the RNG to return a known sequence, perhaps to compare NS-3 to some other simulator


Constructor & Destructor Documentation

ns3::DeterministicVariable::DeterministicVariable ( double *  d,
uint32_t  c 
) [explicit]

Constructor.

Creates a generator that returns successive elements of the d array on successive calls to RandomVariable::GetValue. Note that the d pointer is copied for use by the generator (shallow-copy), not its contents, so the contents of the array d points to have to remain unchanged for the use of DeterministicVariable to be meaningful.

Parameters:
dPointer to array of random values to return in sequence
cNumber of values in the array

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