Template Class TimeStep

Class Documentation

template<typename StateTp>
class TimeStep

Forward declaration.

The TimeStep class.

Public Types

typedef StateTp state_type

state_ Type of the state

Public Functions

TimeStep()

TimeStep.

TimeStep(TimeStepTp type, real_t reward, const state_type &obs)

TimeStep. Constructor.

TimeStep(TimeStepTp type, real_t reward, const state_type &obs, real_t discount_factor)

TimeStep. Constructor.

TimeStep(TimeStepTp type, real_t reward, const state_type &obs, real_t discount_factor, std::unordered_map<std::string, std::any> &&extra)

TimeStep. Constructor.

TimeStep(const TimeStep &other)

TimeStep.

Parameters:

other

TimeStep &operator=(const TimeStep &other)

Assignment operator.

TimeStep(TimeStep &&other) noexcept

TimeStep.

Parameters:

other

TimeStep &operator=(TimeStep &&other) noexcept

operator =

Parameters:

other

Returns:

inline bool first() const noexcept

first

Returns:

inline bool mid() const noexcept

mid

Returns:

inline bool last() const noexcept

last

Returns:

inline TimeStepTp type() const noexcept

type

Returns:

inline state_type observation() const

observation

Returns:

inline real_t reward() const noexcept

reward

Returns:

inline real_t discount() const noexcept

discount. Returns the discount factor

inline bool done() const noexcept

done

Returns:

void clear() noexcept

clear

template<typename T>
const T &get_extra(std::string name) const

get_extra

inline const std::unordered_map<std::string, std::any> &info() const noexcept

info

Returns:

inline std::unordered_map<std::string, std::any> &info() noexcept

info

Returns: