Implementation of state of Pendulum. More...
Public Member Functions | |
State () | |
Construct a state instance. More... | |
State (const arma::colvec &data) | |
Construct a state based on the given data. More... | |
double | AngularVelocity () const |
Get the angular velocity. More... | |
double & | AngularVelocity () |
Modify the value of angular velocity. More... | |
arma::colvec & | Data () |
Modify the internal representation of the state. More... | |
const arma::colvec & | Encode () |
Encode the state to a column vector. More... | |
void | SetState () |
Updates the theta transformations in data. More... | |
double | Theta () const |
Get the theta. More... | |
double & | Theta () |
Modify the value of theta. More... | |
Static Public Attributes | |
static constexpr size_t | dimension = 3 |
Dimension of the encoded state. More... | |
Implementation of state of Pendulum.
Each state is a (cos(theta), sin(theta), angular velocity) vector.
Definition at line 38 of file pendulum.hpp.
|
inline |
Construct a state instance.
Definition at line 44 of file pendulum.hpp.
|
inline |
Construct a state based on the given data.
data | Data for the cos(theta), sin(theta) and angular velocity. |
Definition at line 53 of file pendulum.hpp.
|
inline |
Get the angular velocity.
Definition at line 65 of file pendulum.hpp.
Referenced by Pendulum::InitialSample(), and Pendulum::Sample().
|
inline |
Modify the value of angular velocity.
Definition at line 67 of file pendulum.hpp.
|
inline |
Modify the internal representation of the state.
Definition at line 57 of file pendulum.hpp.
|
inline |
Encode the state to a column vector.
Definition at line 70 of file pendulum.hpp.
|
inline |
Updates the theta transformations in data.
Definition at line 73 of file pendulum.hpp.
Referenced by Pendulum::InitialSample(), and Pendulum::Sample().
|
inline |
Get the theta.
Definition at line 60 of file pendulum.hpp.
Referenced by Pendulum::InitialSample(), and Pendulum::Sample().
|
inline |
Modify the value of theta.
Definition at line 62 of file pendulum.hpp.
|
static |
Dimension of the encoded state.
Definition at line 80 of file pendulum.hpp.