A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::ConstantVariableImpl Class Reference
+ Inheritance diagram for ns3::ConstantVariableImpl:
+ Collaboration diagram for ns3::ConstantVariableImpl:

Public Member Functions

 ConstantVariableImpl ()
 Construct a ConstantVariableImpl RNG that returns zero every sample. More...
 
 ConstantVariableImpl (double c)
 Construct a ConstantVariableImpl RNG that returns the specified value every sample. More...
 
 ConstantVariableImpl (const ConstantVariableImpl &c)
 
virtual RandomVariableBaseCopy (void) const
 
virtual uint32_t GetInteger ()
 
virtual double GetValue ()
 
void NewConstant (double c)
 Specify a new constant RNG for this generator. More...
 
- Public Member Functions inherited from ns3::RandomVariableBase
 RandomVariableBase ()
 
 RandomVariableBase (const RandomVariableBase &o)
 
virtual ~RandomVariableBase ()
 
RngStreamGetStream (void)
 

Private Attributes

double m_const
 

Detailed Description

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

Constructor & Destructor Documentation

ns3::ConstantVariableImpl::ConstantVariableImpl ( )

Construct a ConstantVariableImpl RNG that returns zero every sample.

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

References NS_LOG_FUNCTION.

Referenced by Copy().

+ Here is the caller graph for this function:

ns3::ConstantVariableImpl::ConstantVariableImpl ( double  c)

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

Parameters
cUnchanging value for this RNG.

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

References NS_LOG_FUNCTION.

ns3::ConstantVariableImpl::ConstantVariableImpl ( const ConstantVariableImpl c)

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

References NS_LOG_FUNCTION.

Member Function Documentation

RandomVariableBase * ns3::ConstantVariableImpl::Copy ( void  ) const
virtual

Implements ns3::RandomVariableBase.

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

References ConstantVariableImpl(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

uint32_t ns3::ConstantVariableImpl::GetInteger ( void  )
virtual

Reimplemented from ns3::RandomVariableBase.

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

References m_const, and NS_LOG_FUNCTION.

double ns3::ConstantVariableImpl::GetValue ( void  )
virtual
Returns
The constant value specified

Implements ns3::RandomVariableBase.

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

References m_const, and NS_LOG_FUNCTION.

Referenced by ns3::operator<<().

+ Here is the caller graph for this function:

void ns3::ConstantVariableImpl::NewConstant ( double  c)

Specify a new constant RNG for this generator.

Parameters
cNew constant value for this RNG.

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

References m_const, and NS_LOG_FUNCTION.

Member Data Documentation

double ns3::ConstantVariableImpl::m_const
private

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

Referenced by GetInteger(), GetValue(), and NewConstant().


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