Base_StateB.h

Go to the documentation of this file.
00001 //  \author{Anselmo Cervera, Juan J. Gomez-Cadenas and Jose Angel Hernando}
00002 // \date{11/01}
00003 
00004 #ifndef StateB_h
00005 #define StateB_h 1
00006 
00007 #include "Kalman/Interface_IState.h"
00008 #include "Kalman/Util_HyperVector.h"
00009 
00010 //! General Base class for a IState
00011 /*! A Basic implementation of a IState
00012 */
00013 class StateB : public IState
00014 {
00015  public:
00016   
00017   //! default constructor
00018   StateB(){}
00019   
00020   //! default destructor
00021   virtual ~StateB(){}
00022   
00023   //! copy constructor via an interface
00024   void copy(const IState& is);
00025   void copy(IState& is);
00026 
00027 
00028   //-------- Set and Get methods -----------------
00029   
00030   //! Returns the model name 
00031   virtual std::string modelName() const {return m_modelName;}
00032   //! Set the model name
00033   virtual void setModelName(std::string m) {m_modelName=m;}
00034 
00035   //! name of the volume in which this state is defined 
00036   virtual std::string volumeName() const {return m_volumeName;}
00037   virtual void setVolumeName(std::string name){m_volumeName = name;}    
00038   
00039 
00040   //!   Returns the state HyperVector
00041   //!   This is the hypervector which contains all the information (dynamic+running+static)
00042   virtual const HyperVector& stateHV() const {return m_stateHV;}
00043   //!   Set the dynamic HyperVector
00044   virtual void setStateHV(const HyperVector& hv);
00045 
00046   
00047   //!   Returns the dynamic HyperVector
00048   //!   This is the dynamic hypervector to be computed by the fitter
00049   virtual const HyperVector& dynamicHV() const {return m_dynamicHV;}
00050   //!   Set the dynamic HyperVector
00051   virtual void setDynamicHV(const HyperVector& hv);
00052 
00053   //!   Returns the fitting HyperVector
00054   //!   This is the fitting hypervector to be computed by the fitter
00055   virtual const HyperVector& fittingHV() const {return m_fittingHV;}
00056   //!   Set the fitting HyperVector
00057   virtual void setFittingHV(const HyperVector& hv);
00058 
00059 
00060   //!   Returns the static HyperVector
00061   virtual const HyperVector& staticHV() const {return m_staticHV;}
00062   //!   Set the static HyperVector
00063   virtual void setStaticHV(const HyperVector& hv);
00064   //!   Set a static HyperVector component
00065   virtual void setStaticHVComponent(const int comp, const double number, const double error2);
00066   
00067 
00068   //! Returns the running hypervector associated with the state
00069   virtual const HyperVector& runningHV() const {return m_runningHV;}
00070   //! set the running HV associated with the state
00071   virtual void setRunningHV(const HyperVector& hv);
00072   
00073   //!   Set the dimension of the state  Vector assigning the proper HV initialized to 0.
00074   virtual void setStateNdim(const int dim); 
00075 
00076   //!   Set the dimension of the fitting Vector assigning the proper HV initialized to 0.
00077   virtual void setFittingNdim(const int dim); 
00078 
00079   //!   Set the dimension of the dynamic Vector assigning the proper HV initialized to 0.
00080   virtual void setDynamicNdim(const int dim); 
00081 
00082   //!   Set the dimension of the static Vector assigning the proper HV initialized to 0.
00083   virtual void setStaticNdim(const int dim); 
00084 
00085   //!   Set the dimension of the running vector assigning the proper HV initialized to 0.
00086   virtual void setRunningNdim(const int dim); 
00087 
00088   //!   The transport matrix (linearized kalman filter)
00089   virtual const EMatrix F () const {return m_F;}
00090   //!   Set the transport matrix
00091   virtual void setF (const EMatrix value){m_F=value;}
00092   
00093   //!   The correlated random noise covariance matrix (for
00094   //!   example, the covariance matrix associated to the
00095   //!   multiple scattering between two surfaces)
00096   virtual const EMatrix Q () const {return m_Q;}
00097   //! Set the random noise covariance matrix
00098   virtual void setQ (const EMatrix value){m_Q=value;}
00099 
00100   //----------------------------------
00101 
00102   virtual bool convertModelSpecificHV(EMatrix& J, HyperVector& hv) 
00103   {
00104     std::cout << "StateB::convertModelSpecificHV called with: " << J << " " << hv << std::endl;
00105     return true;
00106   }  //ME added return and warning cout
00107 
00108   //-------- Global acctions -----------------
00109 
00110 
00111   //! Gives dimension and model to the state 
00112   virtual void dress(int dynamicNdim, std::string model);
00113   //! reset the state
00114   virtual void reset();
00115 
00116   //! prints state information
00117   virtual void info(int verb) const;      
00118   virtual void info() const {info(1);}
00119   
00120   
00121  protected:
00122   
00123   //! model
00124   std::string m_modelName;
00125 
00126   //! volume name
00127   std::string m_volumeName; 
00128 
00129   //! state Hyper Vector
00130   HyperVector m_stateHV;
00131 
00132   //! fitting hypervector - parameters that are included in the fitting procedure
00133   HyperVector m_fittingHV;
00134 
00135   //! dynamic hypervector - dynamic parameters (fitting+running)
00136   HyperVector m_dynamicHV;
00137 
00138   //! static hypervector - static parameters
00139   HyperVector m_staticHV;
00140   
00141   //! running hypervector - running parameters
00142   HyperVector m_runningHV;
00143   
00144   EMatrix m_F;
00145   
00146   EMatrix m_Q;
00147   
00148 };
00149 
00150 #endif
00151 

Generated on Mon Nov 23 08:01:44 2009 for MIPP(E907) by  doxygen 1.4.7