00001 // Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando 00002 00003 00004 #ifndef ModelConverterB_h 00005 #define ModelConverterB_h 1 00006 00007 #include "Kalman/Interface_IModelConverter.h" 00008 00009 //! Base class for model IModelConverter 00010 class ModelConverterB: public IModelConverter 00011 { 00012 public: 00013 00014 //! default constructor 00015 ModelConverterB(){}; 00016 00017 // Constructor providing the model 00018 ModelConverterB(std::string first, std::string second ){ 00019 m_firstModel = first; m_secondModel = second; 00020 m_verbosity = 1;} 00021 00022 //! default destructor 00023 virtual ~ModelConverterB(){}; 00024 00025 00026 //! return the model names 00027 virtual std::string firstModel() const {return m_firstModel;} 00028 virtual std::string secondModel() const {return m_secondModel;} 00029 //! set the models 00030 virtual void setFirstModel(std::string name) {m_firstModel = name;} 00031 virtual void setSecondModel(std::string name) {m_secondModel = name;} 00032 00033 00034 //! converts a state from a model to another 00035 virtual bool convertState(IState& state) = 0; 00036 00037 virtual HyperVector convertHV(std::string modelName, 00038 const HyperVector& hv, 00039 const EMatrix& J) = 0; 00040 00041 //! converts a square matrix from a model to another 00042 virtual EMatrix convertFMatrix(const IState& state, 00043 const IState& state) = 0; 00044 00045 //! compute the jacobian 00046 virtual EMatrix computeJacobian(const IState& state, 00047 std::string name) = 0; 00048 00049 //! set verbosity 00050 virtual void setVerbosity(int v){m_verbosity=v;} 00051 //! return verbosity 00052 virtual int verbosity() {return m_verbosity;} 00053 00054 00055 protected: 00056 00057 //! models 00058 std::string m_firstModel; 00059 std::string m_secondModel; 00060 00061 // Verbosity 00062 int m_verbosity; 00063 00064 }; 00065 #endif 00066
1.4.7