work/mixpp/bdm/estim/libPF.h

Go to the documentation of this file.
00001 
00013 #ifndef PF_H
00014 #define PF_H
00015 
00016 #include <itpp/itbase.h>
00017 #include "../stat/libBM.h"
00018 #include "../math/libDC.h"
00019 
00020 using namespace itpp;
00021 
00022 enum RESAMPLING_METHOD { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 };
00023 
00029 class PF : public BM { 
00030 protected:
00031         int n; //number of particles
00032         vec w; //particle weights
00033         Uniform_RNG URNG; //used for resampling
00034         
00035 public:
00037         ivec resample(RESAMPLING_METHOD method = SYSTEMATIC);
00038         PF (vec w);
00039         //TODO remove or implement bayes()!
00040         void bayes(const vec &dt, bool evell){};
00041 };
00042 
00049 class TrivialPF : public PF {
00050         Array<vec> ptcls;
00051         
00052         bool is_proposal;
00053         mpdf *prop;
00054         mpdf *par;
00055         mpdf *obs;
00056         
00057         public:
00058         TrivialPF(mpdf &par, mpdf &obs, mpdf &prop, int n0);
00059         TrivialPF(mpdf &par, mpdf &obs, int n0);
00060         void bayes(const vec &dt, bool evalll);
00061 };
00062 
00063 class MPF : public TrivialPF {
00064         Array<BM> Bms;
00065         public:
00066         MPF(BM &B, mpdf &prop, mpdf &obs, mpdf &par);
00067         void bayes(vec &dt);    
00068 };
00069 
00070 #endif // KF_H
00071 
00072 

Generated on Sun Feb 17 16:14:14 2008 for mixpp by  doxygen 1.5.3