MultiAgentDecisionProcess  Release 0.2.1
JointObservationHistory Class Reference

JointObservationHistory represents a joint observation history. More...

#include <JointObservationHistory.h>

+ Inheritance diagram for JointObservationHistory:
+ Collaboration diagram for JointObservationHistory:

Public Member Functions

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

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.
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.
Index _m_jointObservationI
 The last joint observation (index).
JointObservationHistory_m_pred
 The predecessor joint belief.

Additional Inherited Members

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

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.

Definition at line 47 of file JointObservationHistory.h.

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.

Definition at line 39 of file JointObservationHistory.cpp.

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.

Definition at line 83 of file JointObservationHistory.cpp.

References DEBUG_JOH, and Print().

JointObservationHistory::~JointObservationHistory ( )

Destructor.

Definition at line 89 of file JointObservationHistory.cpp.

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.

Definition at line 99 of file JointObservationHistory.h.

References JointObservationHistory().

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

Returns the indices of the indiv. observation histories.

Definition at line 96 of file JointObservationHistory.cpp.

References _m_individualObservationHistories.

Index JointObservationHistory::GetJointObservationIndex ( ) const
inline

Returns the index of the last received joint observation.

Definition at line 93 of file JointObservationHistory.h.

References _m_jointObservationI.

void JointObservationHistory::Print ( ) const
inlinevirtual

Prints the joint observation history.

Implements History.

Definition at line 105 of file JointObservationHistory.h.

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)

Definition at line 59 of file JointObservationHistory.h.

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.

Definition at line 67 of file JointObservationHistory.h.

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

Index JointObservationHistory::_m_jointObservationI
private

The last joint observation (index).

Definition at line 53 of file JointObservationHistory.h.

Referenced by GetJointObservationIndex(), 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.

Definition at line 63 of file JointObservationHistory.h.

Referenced by JointObservationHistory(), and SoftPrint().


The documentation for this class was generated from the following files: