00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #if !defined(__statistics_h)
00020 #define __statistics_h
00021
00022
00023 #include <cmath>
00024 #include <cstdio>
00025 #include <vector>
00026 #include <limits>
00027 #include "common_header.h"
00028 #include "realvec.h"
00029
00030 namespace Marsyas
00031 {
00039 class marsyas_EXPORT statistics
00040 {
00041 private:
00042 static mrs_real momentN(const realvec& zData, const realvec& weights, int n);
00043 static realvec zDataWeighted(const realvec& data, const realvec& weights, mrs_real mean);
00044
00045 public:
00046
00047 statistics();
00048 ~statistics();
00049
00050 static mrs_real meanWeighted(const realvec& data, const realvec& weights);
00051 static mrs_real stddevWeighted(const realvec& data, const realvec& weights, mrs_real mean);
00052 static mrs_real varWeighted(const realvec& data, const realvec& weights, mrs_real mean);
00053 static mrs_real skewnessWeighted(const realvec& data, const realvec& weights, mrs_real mean);
00054 static mrs_real kurtosisWeighted(const realvec& data, const realvec& weights, mrs_real mean);
00055 };
00056
00057
00058 }
00059
00060 #endif //__statistics_h