DMP_BBO library
ExponentialSystem.hpp
Go to the documentation of this file.
1 
24 #ifndef _EXPONENTIAL_SYSTEM_H_
25 #define _EXPONENTIAL_SYSTEM_H_
26 
28 
29 #include <iosfwd>
30 
31 
32 namespace DmpBbo {
33 
43 {
44 public:
45 
54  ExponentialSystem(double tau, Eigen::VectorXd y_init, Eigen::VectorXd y_attr, double alpha, std::string name="ExponentialSystem");
55 
57  ~ExponentialSystem(void);
58 
59  DynamicalSystem* clone(void) const;
60 
62  const Eigen::Ref<const Eigen::VectorXd>& x,
63  Eigen::Ref<Eigen::VectorXd> xd
64  ) const;
65 
66  void analyticalSolution(const Eigen::VectorXd& ts, Eigen::MatrixXd& xs, Eigen::MatrixXd& xds) const;
67 
71  double alpha(void) const {
72  return alpha_;
73  }
74 
75  std::string toString(void) const;
76 
77 private:
78 
80  double alpha_;
81 
88  ExponentialSystem(void) {};
89 
91  mutable Eigen::VectorXd attractor_state_prealloc_;
92 
95 
101  template<class Archive>
102  void serialize(Archive & ar, const unsigned int version);
103 
104 };
105 
106 }
107 
108 #include <boost/serialization/export.hpp>
111 
112 
113 BOOST_CLASS_IMPLEMENTATION(DmpBbo::ExponentialSystem,boost::serialization::object_serializable);
114 
115 #endif // _Exponential_SYSTEM_H_
116 
double tau(void) const
Accessor function for the time constant.
DynamicalSystem class header file.
BOOST_CLASS_EXPORT_KEY2(DmpBbo::TimeSystem,"TimeSystem")
Register this derived class.
friend class boost::serialization::access
Give boost serialization access to private members.
BOOST_CLASS_IMPLEMENTATION(DmpBbo::ExponentialSystem, boost::serialization::object_serializable)
Register this derived class.
~ExponentialSystem(void)
Destructor.
Dynamical System modelling the evolution of an exponential system: .
std::string name(void) const
Accessor function for the name of the dynamical system.
DynamicalSystem * clone(void) const
Return a pointer to a deep copy of the DynamicalSystem object.
Interface for implementing dynamical systems.
std::string toString(void) const
Returns a string representation of the object.
void differentialEquation(const Eigen::Ref< const Eigen::VectorXd > &x, Eigen::Ref< Eigen::VectorXd > xd) const
The differential equation which defines the system.
double alpha(void) const
Accessor function for decay constant.
void analyticalSolution(const Eigen::VectorXd &ts, Eigen::MatrixXd &xs, Eigen::MatrixXd &xds) const
Return analytical solution of the system at certain times.