NS-3
ns3::ConstantVariable Class Reference

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:
Collaboration diagram for ns3::ConstantVariable:

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.


Constructor & Destructor Documentation

ns3::ConstantVariable::ConstantVariable ( )

Construct a ConstantVariable RNG that returns zero every sample

ns3::ConstantVariable::ConstantVariable ( double  c)

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

Parameters:
cUnchanging value for this RNG.

Member Function Documentation

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

Specify a new constant RNG for this generator.

Parameters:
cNew constant value for this RNG.

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