mlpack
|
Implementation of state of Pendulum. More...
#include <pendulum.hpp>
Public Member Functions | |
State () | |
Construct a state instance. | |
State (const arma::colvec &data) | |
Construct a state based on the given data. More... | |
arma::colvec & | Data () |
Modify the internal representation of the state. | |
double | Theta () const |
Get the theta. | |
double & | Theta () |
Modify the value of theta. | |
double | AngularVelocity () const |
Get the angular velocity. | |
double & | AngularVelocity () |
Modify the value of angular velocity. | |
const arma::colvec & | Encode () |
Encode the state to a column vector. | |
void | SetState () |
Updates the theta transformations in data. | |
Static Public Attributes | |
static constexpr size_t | dimension = 3 |
Dimension of the encoded state. | |
Implementation of state of Pendulum.
Each state is a (cos(theta), sin(theta), angular velocity) vector.
|
inline |
Construct a state based on the given data.
data | Data for the cos(theta), sin(theta) and angular velocity. |