mlpack
|
Implementation of the state of Cart Pole. More...
#include <cart_pole.hpp>
Public Member Functions | |
State () | |
Construct a state instance. | |
State (const arma::colvec &data) | |
Construct a state instance from given data. More... | |
arma::colvec & | Data () |
Modify the internal representation of the state. | |
double | Position () const |
Get the position. | |
double & | Position () |
Modify the position. | |
double | Velocity () const |
Get the velocity. | |
double & | Velocity () |
Modify the velocity. | |
double | Angle () const |
Get the angle. | |
double & | Angle () |
Modify the angle. | |
double | AngularVelocity () const |
Get the angular velocity. | |
double & | AngularVelocity () |
Modify the angular velocity. | |
const arma::colvec & | Encode () const |
Encode the state to a column vector. | |
Static Public Attributes | |
static constexpr size_t | dimension = 4 |
Dimension of the encoded state. | |
Implementation of the state of Cart Pole.
Each state is a tuple vector (position, velocity, angle, angular velocity).
|
inline |
Construct a state instance from given data.
data | Data for the position, velocity, angle and angular velocity. |