Class sdm::HistoryInterface

Class List > sdm > HistoryInterface

A common interface for objects that represent a history.

  • #include <history_interface.hpp>

Inherits the following classes: sdm::State

Inherited by the following classes: sdm::HistoryTree, sdm::JointHistoryInterface

Public Functions

Type Name
virtual std::shared_ptr< HistoryInterface > expand (const std::shared_ptr< Observation > & observation, bool backup=true) = 0
Expands the history.
virtual number getHorizon () const = 0
Get the horizon of the history.
virtual std::shared_ptr< Observation > getLastObservation () = 0
Get the last observation.
virtual std::shared_ptr< HistoryInterface > getPreviousHistory () = 0
Get the previous history.
virtual TypeState getTypeState () const
virtual std::string short_str () const = 0
virtual std::string str () const = 0
Get a string describing the current item.
std::shared_ptr< JointHistoryInterface > toJointHistory ()
Transform the HistoryInterface in aJointHistoryInterface .

Public Functions inherited from sdm::State

See sdm::State

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 ()

Public Functions Documentation

function expand

virtual std::shared_ptr< HistoryInterface > sdm::HistoryInterface::expand (
    const std::shared_ptr< Observation > & observation,
    bool backup=true
) = 0

Parameters:

  • observation the observation of the expanded node

Returns:

the expanded history

We consider that histories can expand next history from themselves and the next observation.

function getHorizon

virtual number sdm::HistoryInterface::getHorizon () const = 0

Returns:

number the history

function getLastObservation

virtual std::shared_ptr< Observation > sdm::HistoryInterface::getLastObservation () = 0

Returns:

the last observation

function getPreviousHistory

virtual std::shared_ptr< HistoryInterface > sdm::HistoryInterface::getPreviousHistory () = 0

Returns:

the one step behind history.

function getTypeState

inline virtual TypeState sdm::HistoryInterface::getTypeState () const

Implements sdm::State::getTypeState

function short_str

virtual std::string sdm::HistoryInterface::short_str () const = 0

function str

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

Returns:

std::string the description of the item

Implements sdm::State::str

function toJointHistory

std::shared_ptr< JointHistoryInterface > sdm::HistoryInterface::toJointHistory () 

Returns:

std::shared_ptr<JointHistoryInterface>


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