MultiAgentDecisionProcess
JointObservationHistory Class Reference

JointObservationHistory represents a joint observation history. More...

#include <JointObservationHistory.h>

Inheritance diagram for JointObservationHistory:
[legend]

Public Member Functions

virtual JointObservationHistoryClone () const
 Returns a pointer to a copy of this class. More...
 
const std::vector< Index > & GetIndividualObservationHistoryIndices () const
 Returns the indices of the indiv. observation histories. More...
 
Index GetJointObservationIndex () const
 Returns the index of the last received joint observation. More...
 
 JointObservationHistory (PlanningUnitMADPDiscrete &pu)
 Constructor - creates a new initial (=empty) JointObservationHistory. More...
 
 JointObservationHistory (Index jObsI, JointObservationHistory *pred)
 Creates a observation history specifying jObsI for the last joint observation and pred as the preceeding JointObservationHistory. More...
 
 JointObservationHistory (const JointObservationHistory &a)
 Copy constructor. More...
 
void Print () const
 Prints the joint observation history. More...
 
std::string SoftPrint () const
 SoftPrints the joint observation history. More...
 
 ~JointObservationHistory ()
 Destructor. More...
 
- Public Member Functions inherited from JointHistory
 JointHistory ()
 (default) Constructor More...
 
virtual ~JointHistory ()
 Destructor. More...
 
- Public Member Functions inherited from History
size_t GetLength () const
 Returns the length of the history, i.e., the number of time steps. More...
 
 History ()
 (default) Constructor More...
 
void SetLength (size_t length)
 Set the length of the history, i.e., the number of time steps. More...
 
virtual ~History ()
 Destructor. More...
 

Private Attributes

bool _m_containsEmptyJOI
 True if the last joint observation (index) is empty (i.e., there is no last joint observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation. More...
 
std::vector< Index_m_individualObservationHistories
 A vector of ints which are the indices of individual ObservationHistories this gives an alternate description of the current JointObservation History. More...
 
Index _m_jointObservationI
 The last joint observation (index). More...
 
PlanningUnitMADPDiscrete_m_planningUnitMADPDiscrete
 ref to the pu More...
 
JointObservationHistory_m_pred
 The predecessor joint belief. More...
 

Additional Inherited Members

- Protected Attributes inherited from History
size_t _m_length
 How long (how many time-steps) is this history? More...
 

Detailed Description

JointObservationHistory represents a joint observation history.

This consists of a joint observation history index, the last joint observation (index) a pointer to the predecessor JOH. and a vector of indexes to the individual observation histories.

Constructor & Destructor Documentation

JointObservationHistory::JointObservationHistory ( PlanningUnitMADPDiscrete pu)

Constructor - creates a new initial (=empty) JointObservationHistory.

This method relies on the fact that the empty individual observation histories are indexed 0.

References _m_containsEmptyJOI, _m_individualObservationHistories, _m_jointObservationI, _m_pred, PlanningUnitMADPDiscrete::GetNrAgents(), and History::SetLength().

Referenced by Clone().

JointObservationHistory::JointObservationHistory ( Index  jObsI,
JointObservationHistory pred 
)
JointObservationHistory::JointObservationHistory ( const JointObservationHistory a)

Copy constructor.

References DEBUG_JOH, and Print().

JointObservationHistory::~JointObservationHistory ( )

Destructor.

References _m_individualObservationHistories, DEBUG_JOH, and Print().

Member Function Documentation

virtual JointObservationHistory* JointObservationHistory::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Implements History.

References JointObservationHistory().

const vector< Index > & JointObservationHistory::GetIndividualObservationHistoryIndices ( ) const

Returns the indices of the indiv. observation histories.

References _m_individualObservationHistories.

Index JointObservationHistory::GetJointObservationIndex ( ) const
inline

Returns the index of the last received joint observation.

void JointObservationHistory::Print ( ) const
inlinevirtual

Prints the joint observation history.

Implements History.

References SoftPrint().

Referenced by PlanningUnitMADPDiscrete::InitializeJointObservationHistories(), JointObservationHistory(), and ~JointObservationHistory().

string JointObservationHistory::SoftPrint ( ) const

Member Data Documentation

bool JointObservationHistory::_m_containsEmptyJOI
private

True if the last joint observation (index) is empty (i.e., there is no last joint observation.) This is particularly true for a observation history at time step t=0 in a MADP that does not issue an initial observation.

(this behavior is defined in MADPComponentDiscreteObservations)

Referenced by JointObservationHistory(), and SoftPrint().

std::vector<Index> JointObservationHistory::_m_individualObservationHistories
private

A vector of ints which are the indices of individual ObservationHistories this gives an alternate description of the current JointObservation History.

Referenced by GetIndividualObservationHistoryIndices(), JointObservationHistory(), and ~JointObservationHistory().

Index JointObservationHistory::_m_jointObservationI
private

The last joint observation (index).

Referenced by JointObservationHistory(), and SoftPrint().

PlanningUnitMADPDiscrete* JointObservationHistory::_m_planningUnitMADPDiscrete
private

ref to the pu

Referenced by JointObservationHistory(), and SoftPrint().

JointObservationHistory* JointObservationHistory::_m_pred
private

The predecessor joint belief.

Together with the last joint observation(_m_jointObservationI) this gives a full description of this joint observation history.

Referenced by JointObservationHistory(), and SoftPrint().