00001 00005 class VectorMoments : public EmpiricalStatistics 00006 00007 { 00008 int nmoments; 00009 int ncomp; 00010 real current_t; 00011 00012 MatSimple(real) quasi_moments; 00013 MatSimple(real) covariance; 00014 MatSimple(real) zmom_collector; 00015 MatSimple(real) corr_collector; 00016 00017 void estimator (); 00018 00019 public: 00020 00021 VectorMoments (); 00022 VectorMoments (int ncomp); 00023 ~VectorMoments () {} 00024 00025 bool redim (int ncomp); 00026 00027 void init (); 00028 void update (VecSimple(real)& x, real t); 00029 00030 void printResults (Os os); 00031 void intermediateResults (Os& os, int result_level = 1); 00032 00033 real getCentralMoment (int comp_no, int moment_no); 00034 00035 00036 00037 00038 00039 00040 00041 00042 real getQuasiMoment (int comp_no, int moment_no) 00043 { return quasi_moments(comp_no, moment_no); } 00044 00045 00046 real getCovariance (int i, int j) { return covariance(i,j); } 00047 00048 real getExpec (int comp_no) { return quasi_moments(comp_no,1); } 00049 real getStDev (int comp_no) { return quasi_moments(comp_no,2); } 00050 real getSkewness (int comp_no) { return quasi_moments(comp_no,3); } 00051 real getKurtosis (int comp_no) { return quasi_moments(comp_no,4); } 00052 }; 00053 00054