Gazebo Transport

API Reference

14.0.0
Statistics Class Reference

Computes the rolling average, min, max, and standard deviation for a set of samples. More...

#include <TopicStatistics.hh>

Public Member Functions

 Statistics ()=default
 Default constructor.
 
 ~Statistics ()=default
 Default destructor.
 
double Avg () const
 Get the average value.
 
uint64_t Count () const
 Get the number of samples.
 
double Max () const
 Get the maximum sample value.
 
double Min () const
 Get the minimum sample value.
 
double StdDev () const
 Get the standard deviation.
 
void Update (double _stat)
 Update with a new sample.
 

Detailed Description

Computes the rolling average, min, max, and standard deviation for a set of samples.

Constructor & Destructor Documentation

◆ Statistics()

Statistics ( )
default

Default constructor.

◆ ~Statistics()

~Statistics ( )
default

Default destructor.

Member Function Documentation

◆ Avg()

double Avg ( ) const

Get the average value.

Returns
the average value.

◆ Count()

uint64_t Count ( ) const

Get the number of samples.

Returns
The number of samples.

◆ Max()

double Max ( ) const

Get the maximum sample value.

Returns
The maximum sample value.

◆ Min()

double Min ( ) const

Get the minimum sample value.

Returns
The minimum sample value.

◆ StdDev()

double StdDev ( ) const

Get the standard deviation.

Returns
The standard deviation.

◆ Update()

void Update ( double  _stat)

Update with a new sample.

Parameters
[in]_statNew statistic sample.

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