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

Classes

class  ValueCDF
 

Public Member Functions

 EmpiricalVariableImpl ()
 Constructor for the EmpiricalVariableImpl random variables. More...
 
 EmpiricalVariableImpl (const EmpiricalVariableImpl &c)
 
virtual ~EmpiricalVariableImpl ()
 
virtual void CDF (double v, double c)
 Specifies a point in the empirical distribution. More...
 
virtual RandomVariableBaseCopy (void) const
 
virtual double GetValue ()
 
- Public Member Functions inherited from ns3::RandomVariableBase
 RandomVariableBase ()
 
 RandomVariableBase (const RandomVariableBase &o)
 
virtual ~RandomVariableBase ()
 
virtual uint32_t GetInteger ()
 
RngStreamGetStream (void)
 

Private Member Functions

virtual double Interpolate (double, double, double, double, double)
 
virtual void Validate ()
 

Private Attributes

std::vector< ValueCDFemp
 
bool validated
 

Detailed Description

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

Constructor & Destructor Documentation

ns3::EmpiricalVariableImpl::EmpiricalVariableImpl ( )
explicit

Constructor for the EmpiricalVariableImpl random variables.

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

References NS_LOG_FUNCTION.

Referenced by Copy().

+ Here is the caller graph for this function:

ns3::EmpiricalVariableImpl::~EmpiricalVariableImpl ( )
virtual

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

References NS_LOG_FUNCTION.

ns3::EmpiricalVariableImpl::EmpiricalVariableImpl ( const EmpiricalVariableImpl c)

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

References NS_LOG_FUNCTION.

Member Function Documentation

void ns3::EmpiricalVariableImpl::CDF ( double  v,
double  c 
)
virtual

Specifies a point in the empirical distribution.

Parameters
vThe function value for this point
cProbability that the function is less than or equal to v

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

References emp, and NS_LOG_FUNCTION.

Referenced by ns3::EmpiricalVariable::CDF().

+ Here is the caller graph for this function:

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

Implements ns3::RandomVariableBase.

Reimplemented in ns3::IntEmpiricalVariableImpl.

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

References EmpiricalVariableImpl(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

double ns3::EmpiricalVariableImpl::GetValue ( void  )
virtual
Returns
A value from this empirical distribution

Implements ns3::RandomVariableBase.

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

References emp, ns3::RandomVariableBase::GetStream(), Interpolate(), NS_LOG_FUNCTION, ns3::RngStream::RandU01(), Validate(), and validated.

Referenced by ns3::IntEmpiricalVariableImpl::GetInteger().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double ns3::EmpiricalVariableImpl::Interpolate ( double  c1,
double  c2,
double  v1,
double  v2,
double  r 
)
privatevirtual

Reimplemented in ns3::IntEmpiricalVariableImpl.

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

References NS_LOG_FUNCTION.

Referenced by GetValue().

+ Here is the caller graph for this function:

void ns3::EmpiricalVariableImpl::Validate ( )
privatevirtual

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

References ns3::EmpiricalVariableImpl::ValueCDF::cdf, current, emp, NS_FATAL_ERROR, NS_LOG_FUNCTION, validated, and ns3::EmpiricalVariableImpl::ValueCDF::value.

Referenced by GetValue().

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<ValueCDF> ns3::EmpiricalVariableImpl::emp
private

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

Referenced by CDF(), GetValue(), and Validate().

bool ns3::EmpiricalVariableImpl::validated
private

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

Referenced by GetValue(), and Validate().


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