Implementation of the state of Double Pole Cart. More...
Public Member Functions | |
| State () | |
| Construct a state instance.  More... | |
| State (const arma::colvec &data) | |
| Construct a state instance from given data.  More... | |
| double | Angle (const size_t i) const | 
| Get the angle of the $i^{th}$ pole.  More... | |
| double & | Angle (const size_t i) | 
| Modify the angle of the $i^{th}$ pole.  More... | |
| double | AngularVelocity (const size_t i) const | 
| Get the angular velocity of the $i^{th}$ pole.  More... | |
| double & | AngularVelocity (const size_t i) | 
| Modify the angular velocity of the $i^{th}$ pole.  More... | |
| arma::colvec | Data () const | 
| Get the internal representation of the state.  More... | |
| arma::colvec & | Data () | 
| Modify the internal representation of the state.  More... | |
| const arma::colvec & | Encode () const | 
| Encode the state to a vector..  More... | |
| double | Position () const | 
| Get the position of the cart.  More... | |
| double & | Position () | 
| Modify the position of the cart.  More... | |
| double | Velocity () const | 
| Get the velocity of the cart.  More... | |
| double & | Velocity () | 
| Modify the velocity of the cart.  More... | |
Static Public Attributes | |
| static constexpr size_t | dimension = 6 | 
| Dimension of the encoded state.  More... | |
Implementation of the state of Double Pole Cart.
The state is expressed as a vector (position, velocity, angle, angular velocity, angle, angular velocity)
Definition at line 35 of file double_pole_cart.hpp.
      
  | 
  inline | 
Construct a state instance.
Definition at line 41 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::InitialSample(), and DoublePoleCart::RK4().
      
  | 
  inline | 
Construct a state instance from given data.
| data | Data for the position, velocity, angle and angular velocity. | 
Definition at line 49 of file double_pole_cart.hpp.
      
  | 
  inline | 
Get the angle of the $i^{th}$ pole.
Definition at line 68 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::Dsdt(), and DoublePoleCart::IsTerminal().
      
  | 
  inline | 
Modify the angle of the $i^{th}$ pole.
Definition at line 70 of file double_pole_cart.hpp.
      
  | 
  inline | 
Get the angular velocity of the $i^{th}$ pole.
Definition at line 73 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::Dsdt(), and DoublePoleCart::Sample().
      
  | 
  inline | 
Modify the angular velocity of the $i^{th}$ pole.
Definition at line 75 of file double_pole_cart.hpp.
      
  | 
  inline | 
Get the internal representation of the state.
Definition at line 53 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::RK4().
      
  | 
  inline | 
Modify the internal representation of the state.
Definition at line 55 of file double_pole_cart.hpp.
      
  | 
  inline | 
Encode the state to a vector..
Definition at line 78 of file double_pole_cart.hpp.
      
  | 
  inline | 
Get the position of the cart.
Definition at line 58 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::IsTerminal().
      
  | 
  inline | 
Modify the position of the cart.
Definition at line 60 of file double_pole_cart.hpp.
      
  | 
  inline | 
Get the velocity of the cart.
Definition at line 63 of file double_pole_cart.hpp.
Referenced by DoublePoleCart::Sample().
      
  | 
  inline | 
Modify the velocity of the cart.
Definition at line 65 of file double_pole_cart.hpp.
      
  | 
  static | 
Dimension of the encoded state.
Definition at line 81 of file double_pole_cart.hpp.