00001 //! \author{Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando} 00002 //! \date{11/01} 00003 00004 #ifndef NoiserB_h 00005 #define NoiserB_h 1 00006 00007 #include "Kalman/Interface_INoiser.h" 00008 #include "Kalman/Interface_IModel.h" 00009 00010 //! Basic Implementation for noiser 00011 /*! 00012 It has a pointer to a IModel to refer to. 00013 */ 00014 class NoiserB : public INoiser 00015 { 00016 public: 00017 00018 //! default constructor 00019 NoiserB() {} 00020 00021 //! Provide the model 00022 NoiserB(IModel* pm){m_model=pm; m_isUsed = false; m_verbosity = pm->verbosity();} 00023 00024 //! default destructor 00025 virtual ~NoiserB() {} 00026 00027 //! get dimension of the dynamic vector 00028 virtual const int dynamicNdim() const {return m_model->dynamicNdim();} 00029 00030 //! Compute the Q matrix 00031 virtual EMatrix computeQMatrix(const IState& ini, const HyperVector& runHV) 00032 { std::cout << "Called NosierB::computeQMatrix with " << runHV << std::endl; ini.info(2); return EMatrix(dynamicNdim(),dynamicNdim(),0);} 00033 //ME added cout and info 00034 00035 //! set name of the noiser 00036 virtual void setName(std::string name) {m_name = name;} 00037 //! returns the name of the noiser 00038 virtual std::string name() const {return m_name;} 00039 00040 //! set the flag if this model is used or not 00041 virtual void setIsUsed(bool flag) {m_isUsed = flag;} 00042 //! is this model used or not 00043 virtual const bool isUsed() const {return m_isUsed;} 00044 00045 00046 //! set noiser verbosity 00047 virtual void setVerbosity(int v){m_verbosity = v;} 00048 //! return noiser verbosity 00049 virtual int verbosity() const {return m_verbosity;} 00050 00051 00052 protected: 00053 00054 //! return a model 00055 virtual IModel& model() const {return *m_model;}; 00056 00057 //! set a model 00058 virtual void setModel(IModel* p) {m_model = p;}; 00059 00060 protected: 00061 00062 //! name of the noiser 00063 std::string m_name; 00064 00065 //! A pointer to the model 00066 IModel* m_model; 00067 00068 //! Flag: is this noiser used or not 00069 bool m_isUsed; 00070 00071 //! verbosity level 00072 int m_verbosity; 00073 00074 }; 00075 00076 #endif
1.4.7