Class sdm::State

Class List > sdm > State

A public interface for states. More...

  • #include <state.hpp>

Inherits the following classes: sdm::Observation

Inherited by the following classes: sdm::BaseState, sdm::AlphaStar::AlphaStarItem, sdm::BaseSerialInterface, sdm::BaseState, sdm::BeliefInterface, sdm::HistoryInterface, sdm::StateGraph

Public Functions

Type Name
virtual TypeState getTypeState () const
virtual size_t hash () const
Get the hash of the state. The hash is used in tabular value functions in order to compare efficiently two states. This function must be reimplemented in inherited classes.
virtual bool operator== (const std::shared_ptr< State > & other) const
Check equality between two states. This function must be implemented in inherited classes.
virtual std::string str () const = 0
Get a string describing the current item.
virtual std::shared_ptr< BeliefInterface > toBelief ()
Cast the state into a belief.
virtual std::shared_ptr< HistoryInterface > toHistory ()
Cast the state into a history.
virtual std::shared_ptr< OccupancyStateInterface > toOccupancyState ()
Cast the state into an occupancy state.
virtual std::shared_ptr< BaseSerialInterface > toSerial ()
Cast the state into a serial interface.
virtual std::shared_ptr< SerialOccupancyInterface > toSerialOccupancyState ()
Cast the state into a serial occupancy state.
virtual ~State ()

Public Functions inherited from sdm::Observation

See sdm::Observation

Type Name
virtual std::string str () const = 0
Get a string describing the current item.
virtual ~Observation ()

Public Functions inherited from sdm::Item

See sdm::Item

Type Name
virtual std::shared_ptr< Item > getPointer ()
Get the shared_ptr on current (this) item.
virtual bool isBaseItem ()
virtual std::string str () const = 0
Get a string describing the current item.
std::shared_ptr< T > to ()
virtual std::shared_ptr< Action > toAction ()
Cast the item into a pointer on action.
virtual std::shared_ptr< Item > toItem ()
Cast the item into a pointer on item.
virtual std::shared_ptr< Observation > toObservation ()
Cast the item into a pointer on observation.
virtual std::shared_ptr< State > toState ()
Cast the item into a pointer on state.

Public Functions inherited from std::inheritable_enable_shared_from_this

See std::inheritable_enable_shared_from_this

Type Name
std::shared_ptr< Down > downcasted_shared_from_this ()
std::shared_ptr< T > shared_from_this ()

Public Functions inherited from std::MultipleInheritableEnableSharedFromThis

See std::MultipleInheritableEnableSharedFromThis

Type Name
virtual ~MultipleInheritableEnableSharedFromThis ()

Detailed Description

Any class inheriting from this interface will be considered as generic state for algorithms. Consider sections Theoritical Background and Algorithms for more information.

Public Functions Documentation

function getTypeState

virtual TypeState sdm::State::getTypeState () const

function hash

virtual size_t sdm::State::hash () const

Returns:

size_t the hash code

function operator==

virtual bool sdm::State::operator== (
    const std::shared_ptr< State > & other
) const

Parameters:

  • other the state to be compared to current state

Returns:

true if states are equal

Returns:

false if they are different

function str

virtual std::string sdm::State::str () const = 0

Returns:

std::string the description of the item

Implements sdm::Observation::str

function toBelief

virtual std::shared_ptr< BeliefInterface > sdm::State::toBelief () 

function toHistory

virtual std::shared_ptr< HistoryInterface > sdm::State::toHistory () 

function toOccupancyState

virtual std::shared_ptr< OccupancyStateInterface > sdm::State::toOccupancyState () 

function toSerial

virtual std::shared_ptr< BaseSerialInterface > sdm::State::toSerial () 

function toSerialOccupancyState

virtual std::shared_ptr< SerialOccupancyInterface > sdm::State::toSerialOccupancyState () 

function ~State

inline virtual sdm::State::~State () 

The documentation for this class was generated from the following file src/sdm/core/state/state.hpp