stats.h
00001
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 #ifndef KSTATS_H
00027 #define KSTATS_H
00028
00029 #include <qptrlist.h>
00030 #include <math.h>
00031 #include "kcalctype.h"
00032
00033 class KStats
00034 {
00035
00036 public:
00037
00038 KStats();
00039 ~KStats();
00040
00041 public:
00042
00043 void clearAll();
00044 void enterData(CALCAMNT data);
00045 void clearLast();
00046 CALCAMNT min();
00047 CALCAMNT max();
00048 CALCAMNT sum();
00049 CALCAMNT mul();
00050 CALCAMNT sum_of_squares();
00051 CALCAMNT mean();
00052 CALCAMNT median();
00053 CALCAMNT std_kernel();
00054 CALCAMNT std();
00055 CALCAMNT sample_std();
00056 int count();
00057 bool error();
00058
00059 private:
00060
00061 QPtrList<CALCAMNT> data;
00062 bool error_flag;
00063
00064 };
00065
00066 class MyList : public QPtrList<CALCAMNT>
00067 {
00068
00069 public:
00070
00071 MyList() : QPtrList<CALCAMNT>() {};
00072
00073 protected:
00074 int compareItems(Item item1,Item item2);
00075 };
00076
00077
00078 #endif
00079
This file is part of the documentation for kspread Library Version 1.4.2.