argos::CStats Class Reference

Calculates the mean, variance, and std deviation of a real-valued signal. More...

#include <signal_processing.h>

Public Member Functions

 CStats ()
 
Real GetMean () const
 Returns the mean of the signal. More...
 
Real GetVariance () const
 Returns the variance of the signal. More...
 
Real GetStdDev () const
 Returns the std deviation of the signal. More...
 
void Append (Real f_value)
 Appends a new piece of data and recalculates the statistics. More...
 

Detailed Description

Calculates the mean, variance, and std deviation of a real-valued signal.

Definition at line 14 of file signal_processing.h.

Constructor & Destructor Documentation

◆ CStats()

argos::CStats::CStats ( )

Definition at line 8 of file signal_processing.cpp.

Member Function Documentation

◆ Append()

void argos::CStats::Append ( Real  f_value)

Appends a new piece of data and recalculates the statistics.

Parameters
f_valueThe value to append.

Definition at line 16 of file signal_processing.cpp.

◆ GetMean()

Real argos::CStats::GetMean ( ) const
inline

Returns the mean of the signal.

Returns
The mean of the signal.

Definition at line 24 of file signal_processing.h.

◆ GetStdDev()

Real argos::CStats::GetStdDev ( ) const
inline

Returns the std deviation of the signal.

At least two pieces of data must have been inserted for the std deviation to be different from the default value, which is 0.

Returns
The std deviation of the signal.

Definition at line 42 of file signal_processing.h.

◆ GetVariance()

Real argos::CStats::GetVariance ( ) const

Returns the variance of the signal.

At least two pieces of data must have been inserted for the variance to be different from the default value, which is 0.

Returns
The variance of the signal.

Definition at line 30 of file signal_processing.cpp.