src/GapsStatistics.h
888a1fd4
 #ifndef __COGAPS_GAPS_STATISTICS_H__
 #define __COGAPS_GAPS_STATISTICS_H__
094c9c46
 
 #include "GibbsSampler.h"
6668db1c
 #include "data_structures/Matrix.h"
094c9c46
 
8269c03c
 enum PumpThreshold
 {
     PUMP_UNIQUE=1,
     PUMP_CUT=2
 };
 
094c9c46
 class GapsStatistics
 {
 private:
 
     ColMatrix mAMeanMatrix;
     ColMatrix mAStdMatrix;
     RowMatrix mPMeanMatrix;
     RowMatrix mPStdMatrix;
     
49a5b154
     unsigned mStatUpdates;
     unsigned mNumPatterns;
094c9c46
 
8269c03c
     ColMatrix mPumpMatrix;
     PumpThreshold mPumpThreshold;
     unsigned mPumpStatUpdates;
 
094c9c46
 public:
 
dd3a9441
     GapsStatistics(unsigned nRow, unsigned nCol, unsigned nFactor, PumpThreshold t=PUMP_CUT);
094c9c46
 
49a5b154
     Rcpp::NumericMatrix AMean() const;
     Rcpp::NumericMatrix AStd() const;
     Rcpp::NumericMatrix PMean() const;
     Rcpp::NumericMatrix PStd() const;
dd3a9441
     Rcpp::NumericMatrix pumpMatrix() const;
     Rcpp::NumericMatrix meanPattern();
49a5b154
 
fb9ea7ed
     float meanChiSq(const AmplitudeGibbsSampler &ASampler) const;
094c9c46
 
     void update(const AmplitudeGibbsSampler &ASampler,
         const PatternGibbsSampler &PSampler);
8269c03c
 
     void updatePump(const AmplitudeGibbsSampler &ASampler,
         const PatternGibbsSampler &PSampler);
 
dd3a9441
     void patternMarkers(ColMatrix normedA, RowMatrix normedP, ColMatrix &statMatrix);
 
8269c03c
     // serialization
     friend Archive& operator<<(Archive &ar, GapsStatistics &stat);
     friend Archive& operator>>(Archive &ar, GapsStatistics &stat);
094c9c46
 };
 
 #endif