9#ifndef BASIC_DATA_CALCULATORS_H
10#define BASIC_DATA_CALCULATORS_H
15#include "ns3/type-name.h"
28template <
typename T = u
int32_t>
189 .SetGroupName(
"Stats")
288template <
typename T = u
int32_t>
353 .SetGroupName(
"Stats")
Template class CounterCalculator.
void Update(const T i)
Increments count by i.
void DoDispose() override
Dispose of this Object.
T m_count
Count value of CounterCalculator.
~CounterCalculator() override
static TypeId GetTypeId()
Register this type.
void Output(DataOutputCallback &callback) const override
Outputs the data based on the provided callback.
T GetCount() const
Returns the count of the CounterCalculator.
void Update()
Increments count by 1.
bool m_enabled
Descendant classes must check & respect m_enabled!
std::string m_context
Context value.
std::string m_key
Key value.
void DoDispose() override
Destructor implementation.
Callback class for the DataOutput classes.
virtual void OutputStatistic(std::string key, std::string variable, const StatisticalSummary *statSum)=0
Outputs the data from the specified StatisticalSummary.
virtual void OutputSingleton(std::string key, std::string variable, int val)=0
Associates the integer value with the variable name for a specific output format.
T m_squareTotal
Sum of squares value of MinMaxAvgTotalCalculator.
double m_varianceCurr
Current variance of MinMaxAvgTotalCalculator.
~MinMaxAvgTotalCalculator() override
MinMaxAvgTotalCalculator()
T m_min
Minimum value of MinMaxAvgTotalCalculator.
void Reset()
Reinitializes all variables of MinMaxAvgTotalCalculator.
long getCount() const override
Returns the count.
static TypeId GetTypeId()
Register this type.
double getVariance() const override
Returns the current variance.
uint32_t m_count
Count value of MinMaxAvgTotalCalculator.
T m_max
Maximum value of MinMaxAvgTotalCalculator.
double getMax() const override
Returns the maximum value.
double m_sCurr
Current s of MinMaxAvgTotalCalculator.
double getSqrSum() const override
Returns the sum of squares.
double getSum() const override
Returns the sum.
double getStddev() const override
Returns the standard deviation.
double getMean() const override
Returns the mean value.
double getMin() const override
Returns the minimum value.
void Output(DataOutputCallback &callback) const override
Outputs the data based on the provided callback.
void Update(const T i)
Updates all variables of MinMaxAvgTotalCalculator.
T m_total
Total value of MinMaxAvgTotalCalculator.
void DoDispose() override
Dispose of this Object.
double m_meanPrev
Previous mean of MinMaxAvgTotalCalculator.
double m_meanCurr
Current mean of MinMaxAvgTotalCalculator.
double m_sPrev
Previous s of MinMaxAvgTotalCalculator.
A base class which provides memory management and object aggregation.
Abstract class for calculating statistical data.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
std::string TypeNameGet()
Type name strings for AttributeValue types.
Every class exported by the ns3 library is enclosed in the ns3 namespace.