Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cValueStats< TYPE > Class Template Reference

#include <cValueStats.h>

Inheritance diagram for GrayLib::cValueStats< TYPE >:
GrayLib::cValueRange< double > Gray::cRangeT< TYPE > GrayLib::cValueStatsRate< float >

Public Member Functions

 cValueStats (TYPE nValAvgStartingEst=0, UINT uSamplesMax=100)
 
TYPE get_ValAvg () const
 
void put_ValAvg (TYPE nValAvg)
 
void AddStat (TYPE nVal)
 
- Public Member Functions inherited from GrayLib::cValueRange< double >
 cValueRange (double tLo=cTypeLimit< double >::k_Min, double tHi=cTypeLimit< double >::k_Min)
 
void InitX (double nVal=cTypeLimit< double >::k_Min)
 
bool isRangeValid () const
 
double GetLinearX (double nVal2, double nRange2) const
 
double GetLinearI (int nVal2, int nRange2=1000) const
 
- Public Member Functions inherited from Gray::cRangeT< TYPE >
TYPE get_Min () const
 
TYPE get_Max () const
 
TYPE get_Avg () const
 
TYPE GetClampValue (TYPE nVal) const
 
bool IsInsideI (TYPE nVal) const
 
bool IsInsideX (TYPE nVal) const
 
TYPE get_RangeI () const
 
TYPE get_RangeX () const
 
TYPE GetLinear1 (float fOne) const
 
int GetSpinValueI (int iVal) const
 
void SetZero ()
 
void put_Min (TYPE iLo)
 
void put_Max (TYPE iHi)
 
void SetRange (TYPE iLo, TYPE iHi)
 
void NormalizeRange ()
 
void UnionValue (TYPE nVal)
 
bool IsRangeOverlapI (const THIS_t &x) const
 
void SetUnionRange (const THIS_t &x)
 

Protected Member Functions

void AddStatW (TYPE nVal, TYPE nWeight)
 

Protected Attributes

const UINT m_uSamplesMax
 average is calculated over n samples. More...
 
UINT m_uSamplesQty
 current number of samples I have processed. for AddStat(). More...
 
TYPE m_nValAvg
 running average. More...
 

Additional Inherited Members

- Public Attributes inherited from Gray::cRangeT< TYPE >
TYPE m_Lo
 low range value. More...
 
TYPE m_Hi
 inclusive high side of range. int size = (hi-lo)+1, float size = hi-lo ?? weird. More...
 

Detailed Description

template<typename TYPE = double>
class GrayLib::cValueStats< TYPE >

compile stats over multiple samples. mean, std deviation ? ASSUME TYPE = double or float.

Constructor & Destructor Documentation

◆ cValueStats()

template<typename TYPE = double>
GrayLib::cValueStats< TYPE >::cValueStats ( TYPE  nValAvgStartingEst = 0,
UINT  uSamplesMax = 100 
)
inline

Member Function Documentation

◆ AddStat()

template<typename TYPE = double>
void GrayLib::cValueStats< TYPE >::AddStat ( TYPE  nVal)
inline

Assume each stat is of equal weight. e.g. regular sample intervals. Assume this is called at set intervals.

◆ AddStatW()

template<typename TYPE = double>
void GrayLib::cValueStats< TYPE >::AddStatW ( TYPE  nVal,
TYPE  nWeight 
)
inlineprotected

Add a weighted value to the average.

  • nWeight = 0 to 1. This might represent a time interval adjustment.

◆ get_ValAvg()

template<typename TYPE = double>
TYPE GrayLib::cValueStats< TYPE >::get_ValAvg ( ) const
inline

◆ put_ValAvg()

template<typename TYPE = double>
void GrayLib::cValueStats< TYPE >::put_ValAvg ( TYPE  nValAvg)
inline

Member Data Documentation

◆ m_nValAvg

template<typename TYPE = double>
TYPE GrayLib::cValueStats< TYPE >::m_nValAvg
protected

running average.

◆ m_uSamplesMax

template<typename TYPE = double>
const UINT GrayLib::cValueStats< TYPE >::m_uSamplesMax
protected

average is calculated over n samples.

◆ m_uSamplesQty

template<typename TYPE = double>
UINT GrayLib::cValueStats< TYPE >::m_uSamplesQty
protected

current number of samples I have processed. for AddStat().


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