DMP_BBO library
TimeSystem.hpp
Go to the documentation of this file.
1 
24 #ifndef _TIME_SYSTEM_H_
25 #define _TIME_SYSTEM_H_
26 
28 
29 namespace DmpBbo {
30 
41 {
42 public:
43 
50  TimeSystem(double tau, bool count_down=false, std::string name="TimeSystem");
51 
53  ~TimeSystem(void);
54 
55  DynamicalSystem* clone(void) const;
56 
58  const Eigen::Ref<const Eigen::VectorXd>& x,
59  Eigen::Ref<Eigen::VectorXd> xd
60  ) const;
61 
62  void analyticalSolution(const Eigen::VectorXd& ts, Eigen::MatrixXd& xs, Eigen::MatrixXd& xds) const;
63 
64  std::string toString(void) const;
65 
69  inline bool count_down(void) const
70  {
71  return count_down_;
72  }
73 
74 private:
75  bool count_down_;
76 
81  TimeSystem(void) {};
82 
84  friend class boost::serialization::access;
85 
91  template<class Archive>
92  void serialize(Archive & ar, const unsigned int version);
93 };
94 
95 }
96 
97 #include <boost/serialization/export.hpp>
98 
101 
103 BOOST_CLASS_IMPLEMENTATION(DmpBbo::TimeSystem,boost::serialization::object_serializable);
104 
105 #endif // _Time_SYSTEM_H_
106 
double tau(void) const
Accessor function for the time constant.
BOOST_CLASS_IMPLEMENTATION(DmpBbo::TimeSystem, boost::serialization::object_serializable)
Don&#39;t add version information to archives.
DynamicalSystem class header file.
BOOST_CLASS_EXPORT_KEY2(DmpBbo::TimeSystem,"TimeSystem")
Register this derived class.
Dynamical System modelling the evolution of a time: .
Definition: TimeSystem.hpp:40
DynamicalSystem * clone(void) const
Return a pointer to a deep copy of the DynamicalSystem object.
Definition: TimeSystem.cpp:62
bool count_down(void) const
Accessor function for count_down.
Definition: TimeSystem.hpp:69
void differentialEquation(const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::Ref< Eigen::VectorXd > xd) const
The differential equation which defines the system.
Definition: TimeSystem.cpp:67
std::string name(void) const
Accessor function for the name of the dynamical system.
void analyticalSolution(const Eigen::VectorXd &ts, Eigen::MatrixXd &xs, Eigen::MatrixXd &xds) const
Return analytical solution of the system at certain times.
Definition: TimeSystem.cpp:92
Interface for implementing dynamical systems.
friend class boost::serialization::access
Give boost serialization access to private members.
Definition: TimeSystem.hpp:81
~TimeSystem(void)
Destructor.
Definition: TimeSystem.cpp:58
std::string toString(void) const
Returns a string representation of the object.
Definition: TimeSystem.cpp:149