00001
00021 #ifndef INC_MI32_STATSIMPLE_H
00022 #define INC_MI32_STATSIMPLE_H
00023
00024 #ifndef INC_MI32_STDDEFNS_H
00025 #include <mi32/stddefns.h>
00026 #endif
00027
00028 #ifdef MISYSTEMDLL
00029 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00030 #else
00031 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00032 #endif
00033
00034
00035
00038
00039 class CLASSLIBEXPORT STAT_SIMPLE {
00040 public:
00041
00043 STAT_SIMPLE ();
00044
00046 ~STAT_SIMPLE ();
00047
00049 void Add (
00050 double value,
00051 double weight = 1
00052 );
00053
00055 void Clear ();
00056
00058 double ComputeMean () const;
00059
00061 double ComputeStandardDeviation () const;
00062
00064 double GetFirst () const
00065 { return (m_First); }
00066
00068 double GetLast () const
00069 { return (m_Last); }
00070
00072 double GetMaximum () const
00073 { return (m_Maximum); }
00074
00076 double GetMinimum () const
00077 { return (m_Minimum); }
00078
00080 double GetSum () const
00081 { return (m_Sum); }
00082
00084 double GetTotalWeight () const
00085 { return (m_TotalWeight); }
00086
00087 private:
00088 #ifndef GENERATING_DOXYGEN_OUTPUT
00089 double m_Minimum;
00090 double m_Maximum;
00091 double m_First;
00092 double m_Last;
00093 double m_Sum;
00094 double m_Sum2;
00095 double m_TotalWeight;
00096 #endif
00097 };
00098
00099
00100
00101
00102 #undef CLASSLIBEXPORT
00103
00104 #endif // INC_MI32_STATSIMPLE_H