a non-random variableDefines a random variable that has a specified, predetermined sequence. More...
#include <random-variable.h>
Public Member Functions | |
DeterministicVariable (double *d, uint32_t c) | |
Constructor. More... | |
![]() | |
RandomVariable () | |
RandomVariable (const RandomVariable &o) | |
~RandomVariable () | |
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... | |
RandomVariable & | operator= (const RandomVariable &o) |
Additional Inherited Members | |
![]() | |
RandomVariable (const RandomVariableBase &variable) | |
RandomVariableBase * | Peek (void) const |
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
Definition at line 507 of file random-variable.h.
|
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.
d | Pointer to array of random values to return in sequence |
c | Number of values in the array |
Definition at line 1415 of file random-variable.cc.
References NS_LOG_FUNCTION.