mlpack
Public Member Functions | Static Public Attributes | List of all members
mlpack::rl::Pendulum::State Class Reference

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.
 

Detailed Description

Implementation of state of Pendulum.

Each state is a (cos(theta), sin(theta), angular velocity) vector.

Constructor & Destructor Documentation

◆ State()

mlpack::rl::Pendulum::State::State ( const arma::colvec &  data)
inline

Construct a state based on the given data.

Parameters
dataData for the cos(theta), sin(theta) and angular velocity.

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