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

#include <average.h>

+ Inheritance diagram for ns3::Average< T >:
+ Collaboration diagram for ns3::Average< T >:

Public Member Functions

 Average ()
void Reset ()
 Reset statistics.
void Update (T const &x)
 Add new sample.
Sample statistics
uint32_t Count () const
 Sample size.
Min () const
 Minimum.
Max () const
 Maximum.
double Avg () const
 Sample average.
double Mean () const
 Estimate of mean, alias to Avg.
double Var () const
 Unbiased estimate of variance.
double Stddev () const
 Standard deviation.
Error of the mean estimates

Note that estimates are valid for

  • uncorrelated measurements,
  • normal distribution and
  • large enough sample size.
double Error90 () const
 Margin of error of the mean for 90% confidence level.
double Error95 () const
 Margin of error of the mean for 95% confidence level.
double Error99 () const
 Margin of error of the mean for 99% confidence level.

Private Attributes

m_max
m_min
uint32_t m_size
MinMaxAvgTotalCalculator< double > m_varianceCalculator

Detailed Description

template<typename T = double>
class ns3::Average< T >

Simple average, min, max and std. deviation calculator

Definition at line 45 of file average.h.

Constructor & Destructor Documentation

template<typename T = double>
ns3::Average< T >::Average ( )
inline

Definition at line 48 of file average.h.

Member Function Documentation

template<typename T = double>
double ns3::Average< T >::Avg ( ) const
inline

Sample average.

Definition at line 82 of file average.h.

Referenced by ns3::Average< double >::Mean(), and ns3::V4Ping::StopApplication().

+ Here is the caller graph for this function:

template<typename T = double>
uint32_t ns3::Average< T >::Count ( ) const
inline
template<typename T = double>
double ns3::Average< T >::Error90 ( ) const
inline

Margin of error of the mean for 90% confidence level.

Definition at line 101 of file average.h.

template<typename T = double>
double ns3::Average< T >::Error95 ( ) const
inline

Margin of error of the mean for 95% confidence level.

Definition at line 103 of file average.h.

template<typename T = double>
double ns3::Average< T >::Error99 ( ) const
inline

Margin of error of the mean for 99% confidence level.

Definition at line 105 of file average.h.

template<typename T = double>
T ns3::Average< T >::Max ( ) const
inline

Maximum.

Definition at line 80 of file average.h.

Referenced by OneIntegerAverageTestCase::DoRun(), FiveIntegersAverageTestCase::DoRun(), FiveDoublesAverageTestCase::DoRun(), and ns3::V4Ping::StopApplication().

+ Here is the caller graph for this function:

template<typename T = double>
double ns3::Average< T >::Mean ( ) const
inline

Estimate of mean, alias to Avg.

Definition at line 84 of file average.h.

Referenced by OneIntegerAverageTestCase::DoRun(), FiveIntegersAverageTestCase::DoRun(), and FiveDoublesAverageTestCase::DoRun().

+ Here is the caller graph for this function:

template<typename T = double>
T ns3::Average< T >::Min ( ) const
inline

Minimum.

Definition at line 78 of file average.h.

Referenced by OneIntegerAverageTestCase::DoRun(), FiveIntegersAverageTestCase::DoRun(), FiveDoublesAverageTestCase::DoRun(), and ns3::V4Ping::StopApplication().

+ Here is the caller graph for this function:

template<typename T = double>
void ns3::Average< T >::Reset ( void  )
inline

Reset statistics.

Definition at line 64 of file average.h.

template<typename T = double>
double ns3::Average< T >::Stddev ( ) const
inline

Standard deviation.

Definition at line 88 of file average.h.

Referenced by OneIntegerAverageTestCase::DoRun(), FiveIntegersAverageTestCase::DoRun(), FiveDoublesAverageTestCase::DoRun(), and ns3::V4Ping::StopApplication().

+ Here is the caller graph for this function:

template<typename T = double>
void ns3::Average< T >::Update ( T const &  x)
inline

Add new sample.

Definition at line 54 of file average.h.

Referenced by OneIntegerAverageTestCase::DoRun(), FiveIntegersAverageTestCase::DoRun(), FiveDoublesAverageTestCase::DoRun(), and ns3::V4Ping::Receive().

+ Here is the caller graph for this function:

template<typename T = double>
double ns3::Average< T >::Var ( ) const
inline

Member Data Documentation

template<typename T = double>
T ns3::Average< T >::m_max
private
template<typename T = double>
T ns3::Average< T >::m_min
private
template<typename T = double>
uint32_t ns3::Average< T >::m_size
private
template<typename T = double>
MinMaxAvgTotalCalculator<double> ns3::Average< T >::m_varianceCalculator
private

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