Class sdm::OccupancyStateInterface

Class List > sdm > OccupancyStateInterface

A common interface for objects that represent an occupancy state.

  • #include <occupancy_state_interface.hpp>

Inherits the following classes: sdm::BeliefInterface

Inherited by the following classes: sdm::CompressibleOccupancyStateInterface, sdm::OccupancyState, sdm::SerialOccupancyInterface

Public Functions

Type Name
virtual void addProbability (const std::shared_ptr< State > & pair_history_belief, double proba) = 0
virtual void addProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) = 0
virtual std::shared_ptr< OccupancyStateInterface > compress () = 0
Compression for occupancy states based on belief state representation. To be in this representation, the type 'TState' have to be a derivation of the interface BeliefState.
virtual void finalize () = 0
virtual std::shared_ptr< Space > getActionSpaceAt (number t) = 0
virtual const std::vector< std::set< std::shared_ptr< HistoryInterface > > > & getAllIndividualHistories () const = 0
Get the set of individual histories that are in the support of the occupancy state (for all agents).
virtual std::shared_ptr< BeliefInterface > getBeliefAt (const std::shared_ptr< JointHistoryInterface > & jhistory) const = 0
Get the set of beliefs at a given joint history.
virtual const std::set< std::shared_ptr< BeliefInterface > > & getBeliefs () const = 0
Get the set of states that are in the support of the occupancy state for a precise joint historiy.
virtual std::shared_ptr< JointHistoryInterface > getCompressedJointHistory (const std::shared_ptr< JointHistoryInterface > &) const = 0
Get the Compressed Joint History.
virtual std::shared_ptr< OccupancyStateInterface > getFullyUncompressedOccupancy () = 0
Get the fully uncompressed occupancy state.
virtual std::vector< std::shared_ptr< JointHistoryInterface > > getIndividualHierarchicalHistoriesOf (number t, number agent) = 0
virtual std::shared_ptr< JointHistoryInterface > getIndividualHierarchicalHistory (number t, number agent, std::shared_ptr< JointHistoryInterface > candidate_ihhistory) = 0
virtual const std::set< std::shared_ptr< HistoryInterface > > & getIndividualHistories (number ag_id) const = 0
Get the set of individual histories that are in the support of the occupancy state (for a given agent).
virtual const std::set< std::shared_ptr< JointHistoryInterface > > & getJointHistories () const = 0
Get the set of joint histories that are in the support of the occupancy state.
virtual std::shared_ptr< JointHistoryInterface > getJointHistory (std::shared_ptr< JointHistoryInterface > candidate_jhistory) = 0
virtual std::vector< std::shared_ptr< JointHistoryInterface > > getJointHistoryVector (number t) = 0
virtual Joint< std::shared_ptr< HistoryInterface > > getJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &) const = 0
Get the list of labels that corresponds to the list of ihistories.
virtual std::shared_ptr< HistoryInterface > getLabel (const std::shared_ptr< HistoryInterface > & ihistory, number agent_id) const = 0
Get the label that corresponds to the ihistory.
virtual std::shared_ptr< OccupancyStateInterface > getOneStepUncompressedOccupancy () = 0
Get the one step uncompressed occupancy state.
virtual double getProbability (const std::shared_ptr< State > & joint_history) const = 0
virtual double getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history) const = 0
virtual double getProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< State > & state) const = 0
virtual double getProbabilityOverIndividualHistories (number, const std::shared_ptr< HistoryInterface > &) const = 0
Get the probability over individual histories and precise agent.
virtual bool individualHierarchicalHistoryVectorForIsDone (number t, number agent) = 0
virtual double minus (const std::shared_ptr< BeliefInterface > & other) const = 0
virtual double operator- (const std::shared_ptr< BeliefInterface > & other) const = 0
virtual void prepareIndividualHierarchicalHistoryVectors (number t) = 0
virtual void pushToIndividualHierarchicalHistoriesOf (number t, number agent, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) = 0
virtual void pushToJointHistoryVector (number t, std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history) = 0
virtual Pair< std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > sampleJointHistoryBelief () = 0
virtual void setActionSpaceAt (number t, std::shared_ptr< Space > action_space) = 0
virtual void setFullyUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) = 0
Set the fully uncompressed occupancy state.
virtual void setOneStepUncompressedOccupancy (const std::shared_ptr< OccupancyStateInterface > &) = 0
Set the one step uncompressed occupancy state.
virtual void setProbability (const std::shared_ptr< State > & pair_history_belief, double proba) = 0
virtual void setProbability (const std::shared_ptr< JointHistoryInterface > & joint_history, const std::shared_ptr< BeliefInterface > & belief, double proba) = 0
virtual void updateJointLabels (const Joint< std::shared_ptr< HistoryInterface >> &, const Joint< std::shared_ptr< HistoryInterface >> &) = 0
Update the labels of multiple individual histories.

Public Functions inherited from sdm::BeliefInterface

See sdm::BeliefInterface

Type Name
virtual void addProbability (const std::shared_ptr< State > &, double proba) = 0
virtual void finalize () = 0
virtual double getDefaultValue () const = 0
virtual double getProbability (const std::shared_ptr< State > & state) const = 0
virtual std::vector< std::shared_ptr< State > > getStates () const = 0
virtual TypeState getTypeState () const
virtual std::shared_ptr< VectorInterface< std::shared_ptr< State >, double > > getVectorInferface () = 0
virtual bool isStateExist (const std::shared_ptr< State > & state_tmp) const = 0
virtual double norm_1 () const = 0
virtual void normalizeBelief (double norm_1) = 0
virtual double operator< (const std::shared_ptr< BeliefInterface > & other) const = 0
virtual bool operator== (const std::shared_ptr< BeliefInterface > & other) const = 0
virtual double operator^ (const std::shared_ptr< BeliefInterface > & other) const = 0
virtual std::shared_ptr< State > sampleState () = 0
virtual void setDefaultValue (double) = 0
virtual void setProbability (const std::shared_ptr< State > & state, double proba) = 0
virtual size_t size () const = 0

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 addProbability [1/2]

virtual void sdm::OccupancyStateInterface::addProbability (
    const std::shared_ptr< State > & pair_history_belief,
    double proba
) = 0

Implements sdm::BeliefInterface::addProbability

function addProbability [2/2]

virtual void sdm::OccupancyStateInterface::addProbability (
    const std::shared_ptr< JointHistoryInterface > & joint_history,
    const std::shared_ptr< BeliefInterface > & belief,
    double proba
) = 0

function compress

virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyStateInterface::compress () = 0

Returns:

the compressed occupancy state

function finalize

virtual void sdm::OccupancyStateInterface::finalize () = 0

Implements sdm::BeliefInterface::finalize

function getActionSpaceAt

virtual std::shared_ptr< Space > sdm::OccupancyStateInterface::getActionSpaceAt (
    number t
) = 0

function getAllIndividualHistories

virtual const std::vector< std::set< std::shared_ptr< HistoryInterface > > > & sdm::OccupancyStateInterface::getAllIndividualHistories () const = 0

function getBeliefAt

virtual std::shared_ptr< BeliefInterface > sdm::OccupancyStateInterface::getBeliefAt (
    const std::shared_ptr< JointHistoryInterface > & jhistory
) const = 0

Parameters:

  • jhistory

Returns:

const std::set<std::shared_ptr<BeliefInterface>>&

function getBeliefs

virtual const std::set< std::shared_ptr< BeliefInterface > > & sdm::OccupancyStateInterface::getBeliefs () const = 0

Returns:

the possible states

function getCompressedJointHistory

virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyStateInterface::getCompressedJointHistory (
    const std::shared_ptr< JointHistoryInterface > &
) const = 0

function getFullyUncompressedOccupancy

virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyStateInterface::getFullyUncompressedOccupancy () = 0

function getIndividualHierarchicalHistoriesOf

virtual std::vector< std::shared_ptr< JointHistoryInterface > > sdm::OccupancyStateInterface::getIndividualHierarchicalHistoriesOf (
    number t,
    number agent
) = 0

function getIndividualHierarchicalHistory

virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyStateInterface::getIndividualHierarchicalHistory (
    number t,
    number agent,
    std::shared_ptr< JointHistoryInterface > candidate_ihhistory
) = 0

function getIndividualHistories

virtual const std::set< std::shared_ptr< HistoryInterface > > & sdm::OccupancyStateInterface::getIndividualHistories (
    number ag_id
) const = 0

Parameters:

  • number the agent identifier

function getJointHistories

virtual const std::set< std::shared_ptr< JointHistoryInterface > > & sdm::OccupancyStateInterface::getJointHistories () const = 0

Returns:

the possible joint hitories

function getJointHistory

virtual std::shared_ptr< JointHistoryInterface > sdm::OccupancyStateInterface::getJointHistory (
    std::shared_ptr< JointHistoryInterface > candidate_jhistory
) = 0

function getJointHistoryVector

virtual std::vector< std::shared_ptr< JointHistoryInterface > > sdm::OccupancyStateInterface::getJointHistoryVector (
    number t
) = 0

function getJointLabels

virtual Joint < std::shared_ptr< HistoryInterface > > sdm::OccupancyStateInterface::getJointLabels (
    const Joint < std::shared_ptr< HistoryInterface >> &
) const = 0

function getLabel

virtual std::shared_ptr< HistoryInterface > sdm::OccupancyStateInterface::getLabel (
    const std::shared_ptr< HistoryInterface > & ihistory,
    number agent_id
) const = 0

function getOneStepUncompressedOccupancy

virtual std::shared_ptr< OccupancyStateInterface > sdm::OccupancyStateInterface::getOneStepUncompressedOccupancy () = 0

function getProbability [1/3]

virtual double sdm::OccupancyStateInterface::getProbability (
    const std::shared_ptr< State > & joint_history
) const = 0

Implements sdm::BeliefInterface::getProbability

function getProbability [2/3]

virtual double sdm::OccupancyStateInterface::getProbability (
    const std::shared_ptr< JointHistoryInterface > & joint_history
) const = 0

function getProbability [3/3]

virtual double sdm::OccupancyStateInterface::getProbability (
    const std::shared_ptr< JointHistoryInterface > & joint_history,
    const std::shared_ptr< State > & state
) const = 0

function getProbabilityOverIndividualHistories

virtual double sdm::OccupancyStateInterface::getProbabilityOverIndividualHistories (
    number,
    const std::shared_ptr< HistoryInterface > &
) const = 0

Parameters:

  • number Agent Id
  • typename jhistory_type::element_type::ihistory_type : Individual History

function individualHierarchicalHistoryVectorForIsDone

virtual bool sdm::OccupancyStateInterface::individualHierarchicalHistoryVectorForIsDone (
    number t,
    number agent
) = 0

function minus

virtual double sdm::OccupancyStateInterface::minus (
    const std::shared_ptr< BeliefInterface > & other
) const = 0

function operator-

virtual double sdm::OccupancyStateInterface::operator- (
    const std::shared_ptr< BeliefInterface > & other
) const = 0

function prepareIndividualHierarchicalHistoryVectors

virtual void sdm::OccupancyStateInterface::prepareIndividualHierarchicalHistoryVectors (
    number t
) = 0

function pushToIndividualHierarchicalHistoriesOf

virtual void sdm::OccupancyStateInterface::pushToIndividualHierarchicalHistoriesOf (
    number t,
    number agent,
    std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history
) = 0

function pushToJointHistoryVector

virtual void sdm::OccupancyStateInterface::pushToJointHistoryVector (
    number t,
    std::shared_ptr< JointHistoryInterface > & individual_hierarchical_history
) = 0

function sampleJointHistoryBelief

virtual Pair < std::shared_ptr< JointHistoryInterface >, std::shared_ptr< BeliefInterface > > sdm::OccupancyStateInterface::sampleJointHistoryBelief () = 0

function setActionSpaceAt

virtual void sdm::OccupancyStateInterface::setActionSpaceAt (
    number t,
    std::shared_ptr< Space > action_space
) = 0

function setFullyUncompressedOccupancy

virtual void sdm::OccupancyStateInterface::setFullyUncompressedOccupancy (
    const std::shared_ptr< OccupancyStateInterface > &
) = 0

function setOneStepUncompressedOccupancy

virtual void sdm::OccupancyStateInterface::setOneStepUncompressedOccupancy (
    const std::shared_ptr< OccupancyStateInterface > &
) = 0

function setProbability [1/2]

virtual void sdm::OccupancyStateInterface::setProbability (
    const std::shared_ptr< State > & pair_history_belief,
    double proba
) = 0

Implements sdm::BeliefInterface::setProbability

function setProbability [2/2]

virtual void sdm::OccupancyStateInterface::setProbability (
    const std::shared_ptr< JointHistoryInterface > & joint_history,
    const std::shared_ptr< BeliefInterface > & belief,
    double proba
) = 0

function updateJointLabels

virtual void sdm::OccupancyStateInterface::updateJointLabels (
    const Joint < std::shared_ptr< HistoryInterface >> &,
    const Joint < std::shared_ptr< HistoryInterface >> &
) = 0

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