ns3::ConstantVariable Class Reference
[Random Variable Distributions]

A random variable that returns a constantClass ConstantVariable defines a random number generator that returns the same value every sample. More...

#include <random-variable.h>

Inheritance diagram for ns3::ConstantVariable:
Inheritance graph
[legend]
Collaboration diagram for ns3::ConstantVariable:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ConstantVariable ()
 ConstantVariable (double c)
void SetConstant (double c)
 Specify a new constant RNG for this generator.

Detailed Description

A random variable that returns a constant

Class ConstantVariable defines a random number generator that returns the same value every sample.

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


Constructor & Destructor Documentation

ns3::ConstantVariable::ConstantVariable (  ) 

Construct a ConstantVariable RNG that returns zero every sample

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

Referenced by SetConstant().

ns3::ConstantVariable::ConstantVariable ( double  c  ) 

Construct a ConstantVariable RNG that returns the specified value every sample.

Parameters:
c Unchanging value for this RNG.

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


Member Function Documentation

void ns3::ConstantVariable::SetConstant ( double  c  ) 

Specify a new constant RNG for this generator.

Parameters:
c New constant value for this RNG.

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

References ConstantVariable().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:10:30 2009 for NS-3 by  doxygen 1.6.3