![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cValueStats.h>
Public Member Functions | |
| cValueStatsRate (TYPE nValAvgEst=0, UINT uSamplesMax=cTimeSys::k_FREQ) | |
| void | ResetStatsTime () |
| bool | AddStat (TYPE nVal) |
| bool | AddStatDiff (TYPE nVal) |
| bool | AddStatDiffX (TYPE nVal) |
| UNITTEST2_PREDEF (cValueStats) | |
Public Member Functions inherited from GrayLib::cValueStats< double > | |
| cValueStats (double nValAvgStartingEst=0, UINT uSamplesMax=100) | |
| double | get_ValAvg () const |
| void | put_ValAvg (double nValAvg) |
| void | AddStat (double 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) |
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... | |
Protected Member Functions inherited from GrayLib::cValueStats< double > | |
| void | AddStatW (double nVal, double nWeight) |
Protected Attributes inherited from GrayLib::cValueStats< double > | |
| const UINT | m_uSamplesMax |
| average is calculated over n samples. More... | |
| UINT | m_uSamplesQty |
| current number of samples I have processed. for AddStat(). More... | |
| double | m_nValAvg |
| running average. More... | |
Calculate a average of a number over time. m_nValAvg = per second average. Add stats at an arbitrary time rate. Can be used as a rate of change as well using Diff. uSamplesMax = the average window size in seconds. ASSUME TYPE = double or float.
|
inline |
|
inline |
Add stats at an arbitrary time rate. update m_nValAvg. (per second average change)
|
inline |
Add stats at an arbitrary time rate. Add diff from cumulative total.
|
inline |
Add diff from nVal as cumulative total. Watch for nVal wrapping around.
|
inline |
| GrayLib::cValueStatsRate< TYPE >::UNITTEST2_PREDEF | ( | cValueStats | ) |