A Discrete-Event Network Simulator
API
Public Member Functions | Private Attributes | List of all members
ns3::Average< T > Class Template Reference

Simple average, min, max and std. More...

#include "average.h"

Public Member Functions

 Average ()
 
double Avg () const
 Sample average. More...
 
uint32_t Count () const
 Sample size. More...
 
Max () const
 Maximum. More...
 
double Mean () const
 Estimate of mean, alias to Avg. More...
 
Min () const
 Minimum. More...
 
void Reset ()
 Reset statistics. More...
 
double Stddev () const
 Standard deviation. More...
 
void Update (T const &x)
 Add new sample. More...
 
double Var () const
 Unbiased estimate of variance. More...
 
Error of the mean estimates
double Error90 () const
 Margin of error of the mean for 90% confidence level. More...
 
double Error95 () const
 Margin of error of the mean for 95% confidence level. More...
 
double Error99 () const
 Margin of error of the mean for 99% confidence level. More...
 

Private Attributes

m_max
 Maximum value observed. More...
 
m_min
 Minimum value observed. More...
 
uint32_t m_size
 Number of sampled data. More...
 
MinMaxAvgTotalCalculator< double > m_varianceCalculator
 Variance calculator. More...
 

Detailed Description

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

Simple average, min, max and std.

deviation calculator

Definition at line 40 of file average.h.

Constructor & Destructor Documentation

◆ Average()

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

Definition at line 43 of file average.h.

Member Function Documentation

◆ Avg()

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

Sample average.

Definition at line 76 of file average.h.

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

◆ Count()

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

◆ Error90()

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

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

Note that estimates are valid for

  • uncorrelated measurements,
  • normal distribution and
  • large enough sample size.
Returns
Margin of error of the mean for 90% confidence level

Definition at line 99 of file average.h.

◆ Error95()

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

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

Note that estimates are valid for

  • uncorrelated measurements,
  • normal distribution and
  • large enough sample size.
Returns
Margin of error of the mean for 95% confidence level

Definition at line 110 of file average.h.

◆ Error99()

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

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

Note that estimates are valid for

  • uncorrelated measurements,
  • normal distribution and
  • large enough sample size.
Returns
Margin of error of the mean for 99% confidence level

Definition at line 122 of file average.h.

◆ Max()

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

◆ Mean()

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

Estimate of mean, alias to Avg.

Definition at line 78 of file average.h.

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

◆ Min()

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

◆ Reset()

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

Reset statistics.

Definition at line 59 of file average.h.

◆ Stddev()

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

◆ Update()

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

◆ Var()

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

Member Data Documentation

◆ m_max

template<typename T = double>
T ns3::Average< T >::m_max
private

Maximum value observed.

Definition at line 128 of file average.h.

Referenced by ns3::Average< double >::Max(), ns3::Average< double >::Reset(), and ns3::Average< double >::Update().

◆ m_min

template<typename T = double>
T ns3::Average< T >::m_min
private

Minimum value observed.

Definition at line 127 of file average.h.

Referenced by ns3::Average< double >::Min(), ns3::Average< double >::Reset(), and ns3::Average< double >::Update().

◆ m_size

template<typename T = double>
uint32_t ns3::Average< T >::m_size
private

Number of sampled data.

Definition at line 126 of file average.h.

Referenced by ns3::Average< double >::Count(), ns3::Average< double >::Reset(), and ns3::Average< double >::Update().

◆ m_varianceCalculator

template<typename T = double>
MinMaxAvgTotalCalculator<double> ns3::Average< T >::m_varianceCalculator
private

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