A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::Histogram Class Reference

#include <histogram.h>

+ Collaboration diagram for ns3::Histogram:

Public Member Functions

 Histogram (double binWidth)
 Histogram ()
void AddValue (double value)
uint32_t GetBinCount (uint32_t index)
double GetBinEnd (uint32_t index)
double GetBinStart (uint32_t index)
double GetBinWidth (uint32_t index) const
uint32_t GetNBins () const
void SerializeToXmlStream (std::ostream &os, int indent, std::string elementName) const
void SetDefaultBinWidth (double binWidth)

Private Attributes

double m_binWidth
std::vector< uint32_t > m_histogram

Detailed Description

Definition at line 30 of file histogram.h.

Constructor & Destructor Documentation

ns3::Histogram::Histogram ( double  binWidth)

Definition at line 93 of file histogram.cc.

References m_binWidth.

ns3::Histogram::Histogram ( )

Definition at line 98 of file histogram.cc.

References DEFAULT_BIN_WIDTH, and m_binWidth.

Member Function Documentation

void ns3::Histogram::AddValue ( double  value)

Definition at line 79 of file histogram.cc.

References m_binWidth, m_histogram, and NS_LOG_DEBUG.

Referenced by ns3::HistogramTestCase::DoRun(), and ns3::FlowMonitor::ReportLastRx().

+ Here is the caller graph for this function:

uint32_t ns3::Histogram::GetBinCount ( uint32_t  index)

Definition at line 72 of file histogram.cc.

References m_histogram, and NS_ASSERT.

Referenced by ns3::HistogramTestCase::DoRun().

+ Here is the caller graph for this function:

double ns3::Histogram::GetBinEnd ( uint32_t  index)

Definition at line 53 of file histogram.cc.

References m_binWidth.

double ns3::Histogram::GetBinStart ( uint32_t  index)

Definition at line 47 of file histogram.cc.

References m_binWidth.

Referenced by ns3::HistogramTestCase::DoRun().

+ Here is the caller graph for this function:

double ns3::Histogram::GetBinWidth ( uint32_t  index) const

Definition at line 59 of file histogram.cc.

References m_binWidth.

Referenced by ns3::HistogramTestCase::DoRun().

+ Here is the caller graph for this function:

uint32_t ns3::Histogram::GetNBins ( ) const

Definition at line 41 of file histogram.cc.

References m_histogram.

Referenced by ns3::HistogramTestCase::DoRun().

+ Here is the caller graph for this function:

void ns3::Histogram::SerializeToXmlStream ( std::ostream &  os,
int  indent,
std::string  elementName 
) const

Definition at line 105 of file histogram.cc.

References INDENT, m_binWidth, and m_histogram.

void ns3::Histogram::SetDefaultBinWidth ( double  binWidth)

Definition at line 65 of file histogram.cc.

References m_binWidth, m_histogram, and NS_ASSERT.

Referenced by ns3::FlowMonitor::GetStatsForFlow().

+ Here is the caller graph for this function:

Member Data Documentation

double ns3::Histogram::m_binWidth
private
std::vector<uint32_t> ns3::Histogram::m_histogram
private

Definition at line 56 of file histogram.h.

Referenced by AddValue(), GetBinCount(), GetNBins(), SerializeToXmlStream(), and SetDefaultBinWidth().


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