Implementation of state of Mountain Car. More...
Public Member Functions | |
State () | |
Construct a state instance. More... | |
State (const arma::colvec &data) | |
Construct a state based on the given data. More... | |
arma::colvec & | Data () |
Modify the internal representation of the state. More... | |
const arma::colvec & | Encode () const |
Encode the state to a column vector. More... | |
double | Position () const |
Get the position. More... | |
double & | Position () |
Modify the position. More... | |
double | Velocity () const |
Get the velocity. More... | |
double & | Velocity () |
Modify the velocity. More... | |
Static Public Attributes | |
static constexpr size_t | dimension = 2 |
Dimension of the encoded state. More... | |
Implementation of state of Mountain Car.
Each state is a (velocity, position) vector.
Definition at line 35 of file mountain_car.hpp.
|
inline |
Construct a state instance.
Definition at line 41 of file mountain_car.hpp.
|
inline |
Construct a state based on the given data.
data | Data for the velocity and position. |
Definition at line 49 of file mountain_car.hpp.
|
inline |
Modify the internal representation of the state.
Definition at line 53 of file mountain_car.hpp.
|
inline |
Encode the state to a column vector.
Definition at line 66 of file mountain_car.hpp.
|
inline |
Get the position.
Definition at line 61 of file mountain_car.hpp.
Referenced by MountainCar::InitialSample(), MountainCar::IsTerminal(), and MountainCar::Sample().
|
inline |
Modify the position.
Definition at line 63 of file mountain_car.hpp.
|
inline |
Get the velocity.
Definition at line 56 of file mountain_car.hpp.
Referenced by MountainCar::InitialSample(), and MountainCar::Sample().
|
inline |
Modify the velocity.
Definition at line 58 of file mountain_car.hpp.
|
static |
Dimension of the encoded state.
Definition at line 69 of file mountain_car.hpp.