kspread
stats.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef KSTATS_H
00028 #define KSTATS_H
00029
00030 #include <qptrlist.h>
00031 #include <math.h>
00032 #include "kcalctype.h"
00033
00034 class KStats
00035 {
00036
00037 public:
00038
00039 KStats();
00040 ~KStats();
00041
00042 public:
00043
00044 void clearAll();
00045 void enterData(CALCAMNT data);
00046 void clearLast();
00047 CALCAMNT min();
00048 CALCAMNT max();
00049 CALCAMNT sum();
00050 CALCAMNT mul();
00051 CALCAMNT sum_of_squares();
00052 CALCAMNT mean();
00053 CALCAMNT median();
00054 CALCAMNT std_kernel();
00055 CALCAMNT std();
00056 CALCAMNT sample_std();
00057 int count();
00058 bool error();
00059
00060 private:
00061
00062 QPtrList<CALCAMNT> data;
00063 bool error_flag;
00064
00065 };
00066
00067 class MyList : public QPtrList<CALCAMNT>
00068 {
00069
00070 public:
00071
00072 MyList() : QPtrList<CALCAMNT>() {};
00073
00074 protected:
00075 int compareItems(Item item1,Item item2);
00076 };
00077
00078
00079 #endif
00080
|