ContinuousDoublePoleCart::State Class Reference

Implementation of the state of Continuous 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...

 

Detailed Description

Implementation of the state of Continuous Double Pole Cart.

The state is expressed as a vector (position, velocity, angle, angular velocity, angle, angular velocity)

Definition at line 36 of file continuous_double_pole_cart.hpp.

Constructor & Destructor Documentation

◆ State() [1/2]

State ( )
inline

Construct a state instance.

Definition at line 42 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::InitialSample(), and ContinuousDoublePoleCart::RK4().

◆ State() [2/2]

State ( const arma::colvec &  data)
inline

Construct a state instance from given data.

Parameters
dataData for the position, velocity, angle and angular velocity.

Definition at line 50 of file continuous_double_pole_cart.hpp.

Member Function Documentation

◆ Angle() [1/2]

double Angle ( const size_t  i) const
inline

Get the angle of the $i^{th}$ pole.

Definition at line 69 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::Dsdt(), and ContinuousDoublePoleCart::IsTerminal().

◆ Angle() [2/2]

double& Angle ( const size_t  i)
inline

Modify the angle of the $i^{th}$ pole.

Definition at line 71 of file continuous_double_pole_cart.hpp.

◆ AngularVelocity() [1/2]

double AngularVelocity ( const size_t  i) const
inline

Get the angular velocity of the $i^{th}$ pole.

Definition at line 74 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::Dsdt(), and ContinuousDoublePoleCart::Sample().

◆ AngularVelocity() [2/2]

double& AngularVelocity ( const size_t  i)
inline

Modify the angular velocity of the $i^{th}$ pole.

Definition at line 76 of file continuous_double_pole_cart.hpp.

◆ Data() [1/2]

arma::colvec Data ( ) const
inline

Get the internal representation of the state.

Definition at line 54 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::RK4().

◆ Data() [2/2]

arma::colvec& Data ( )
inline

Modify the internal representation of the state.

Definition at line 56 of file continuous_double_pole_cart.hpp.

◆ Encode()

const arma::colvec& Encode ( ) const
inline

Encode the state to a vector..

Definition at line 79 of file continuous_double_pole_cart.hpp.

◆ Position() [1/2]

double Position ( ) const
inline

Get the position of the cart.

Definition at line 59 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::IsTerminal().

◆ Position() [2/2]

double& Position ( )
inline

Modify the position of the cart.

Definition at line 61 of file continuous_double_pole_cart.hpp.

◆ Velocity() [1/2]

double Velocity ( ) const
inline

Get the velocity of the cart.

Definition at line 64 of file continuous_double_pole_cart.hpp.

Referenced by ContinuousDoublePoleCart::Sample().

◆ Velocity() [2/2]

double& Velocity ( )
inline

Modify the velocity of the cart.

Definition at line 66 of file continuous_double_pole_cart.hpp.

Member Data Documentation

◆ dimension

constexpr size_t dimension = 6
static

Dimension of the encoded state.

Definition at line 82 of file continuous_double_pole_cart.hpp.


The documentation for this class was generated from the following file: