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 () const
 Encode the state to a column vector. More...

 
double Theta () const
 Get the theta. More...

 
double & Theta ()
 Modify the value of theta. More...

 

Static Public Attributes

static constexpr size_t dimension = 2
 Dimension of the encoded state. More...

 

Detailed Description

Implementation of state of Pendulum.

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

Definition at line 37 of file pendulum.hpp.

Constructor & Destructor Documentation

◆ State() [1/2]

State ( )
inline

Construct a state instance.

Definition at line 43 of file pendulum.hpp.

◆ State() [2/2]

State ( const arma::colvec &  data)
inline

Construct a state based on the given data.

Parameters
dataData for the theta and angular velocity.

Definition at line 51 of file pendulum.hpp.

Member Function Documentation

◆ AngularVelocity() [1/2]

double AngularVelocity ( ) const
inline

Get the angular velocity.

Definition at line 63 of file pendulum.hpp.

Referenced by Pendulum::InitialSample(), and Pendulum::Sample().

◆ AngularVelocity() [2/2]

double& AngularVelocity ( )
inline

Modify the value of angular velocity.

Definition at line 65 of file pendulum.hpp.

◆ Data()

arma::colvec& Data ( )
inline

Modify the internal representation of the state.

Definition at line 55 of file pendulum.hpp.

◆ Encode()

const arma::colvec& Encode ( ) const
inline

Encode the state to a column vector.

Definition at line 68 of file pendulum.hpp.

◆ Theta() [1/2]

double Theta ( ) const
inline

Get the theta.

Definition at line 58 of file pendulum.hpp.

Referenced by Pendulum::InitialSample(), Pendulum::IsTerminal(), and Pendulum::Sample().

◆ Theta() [2/2]

double& Theta ( )
inline

Modify the value of theta.

Definition at line 60 of file pendulum.hpp.

Member Data Documentation

◆ dimension

constexpr size_t dimension = 2
static

Dimension of the encoded state.

Definition at line 71 of file pendulum.hpp.


The documentation for this class was generated from the following file:
  • /home/jenkins-mlpack/mlpack.org/_src/mlpack-3.2.1/src/mlpack/methods/reinforcement_learning/environment/pendulum.hpp