dynamical-system-functor-base.hpp
Go to the documentation of this file.
1 
13 #ifndef STATEOBSERVERDYNAMICALSYSTEMFUNCTORBASE_H
14 #define STATEOBSERVERDYNAMICALSYSTEMFUNCTORBASE_H
15 
16 #include <state-observation/api.h>
18 
19 namespace stateObservation
20 {
21 
32 class STATE_OBSERVATION_DLLAPI DynamicalSystemFunctorBase
33 {
34 public:
36  virtual ~DynamicalSystemFunctorBase();
37 
39  virtual Vector stateDynamics(const Vector & x, const Vector & u, TimeIndex k) = 0;
40 
42  virtual Vector measureDynamics(const Vector & x, const Vector & u, TimeIndex k) = 0;
43 
46  virtual void reset() {}
47 
49  virtual Index getStateSize() const = 0;
51  virtual Index getInputSize() const = 0;
53  virtual Index getMeasurementSize() const = 0;
54 
56  virtual bool checkStateVector(const Vector &);
58  virtual bool checkInputvector(const Vector &);
59 
60 protected:
61  inline void assertStateVector_(const Vector & v)
62  {
63  (void)v; // avoid warning
64  BOOST_ASSERT(checkStateVector(v) && "ERROR: The state vector has the wrong size");
65  }
66  inline void assertInputVector_(const Vector & v)
67  {
68  (void)v; // avoid warning
69  BOOST_ASSERT(checkInputvector(v) && "ERROR: The input vector has the wrong size");
70  }
71 
72 private:
73 };
74 
75 } // namespace stateObservation
76 
77 #endif // STATEOBSERVERDYNAMICSYSTEMFUNCTORBASE_H
stateObservation::Vector
Eigen::VectorXd Vector
Dynamic sized scalar vector.
Definition: definitions.hpp:76
stateObservation::DynamicalSystemFunctorBase
This is the base class of any functor that describes the dynamics of the state and the measurement....
Definition: dynamical-system-functor-base.hpp:32
stateObservation::TimeIndex
long int TimeIndex
Definition: definitions.hpp:139
stateObservation::Index
Eigen::Index Index
Definition: definitions.hpp:138
definitions.hpp
Definitions of types and some structures.
stateObservation::DynamicalSystemFunctorBase::assertStateVector_
void assertStateVector_(const Vector &v)
Definition: dynamical-system-functor-base.hpp:61
stateObservation::DynamicalSystemFunctorBase::reset
virtual void reset()
Definition: dynamical-system-functor-base.hpp:46
stateObservation
Definition: bidim-elastic-inv-pendulum-dyn-sys.hpp:20
stateObservation::DynamicalSystemFunctorBase::assertInputVector_
void assertInputVector_(const Vector &v)
Definition: dynamical-system-functor-base.hpp:66