MultiAgentDecisionProcess  Release 0.2.1
JointActionObservationHistory Class Reference

JointActionObservationHistory represents a joint action observation history. More...

#include <JointActionObservationHistory.h>

+ Inheritance diagram for JointActionObservationHistory:
+ Collaboration diagram for JointActionObservationHistory:

Public Member Functions

virtual
JointActionObservationHistory
Clone () const
 Returns a pointer to a copy of this class.
const std::vector< Index > & GetIndividualActionObservationHistoryIndices () const
 Returns the indices of the indiv. action observation histories.
Index GetJointActionIndex () const
 Gets the last joint action index.
void GetJointActionObservationHistoryVectors (std::vector< Index > &jaIs, std::vector< Index > &joIs)
 Get vectors of joint action and observation indices stored by this history.
Index GetJointObservationIndex () const
 Gets the last joint observation index.
 JointActionObservationHistory (PlanningUnitMADPDiscrete &pu)
 (default) Constructor - creates a new initial (=empty) JointActionObservationHistory.
 JointActionObservationHistory (Index jaI, Index joI, JointActionObservationHistory *pred)
 Creates the joint action-obs.
void Print () const
 Prints the history.
std::string SoftPrint () const
 SoftPrints the history.
std::string SoftPrintJointIndices () const
 SoftPrints the history in terms of joint action/observation indices.
- 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 Member Functions

void GetJointActionObservationHistoryVectorsRecursive (std::vector< Index > &jaIs, std::vector< Index > &joIs)

Private Attributes

std::vector< Index > _m_individualActionObservationHistories
 A vector of Indices which are the indices of individual ActionObservationHistories this gives an alternate description of the current JointActionObservation History.
Index _m_jaI
 The last joint action (index).
Index _m_joI
 The last joint observation (index).
JointActionObservationHistory_m_pred
 The predecessor together with the last joint actionObservation (_m_actionObservationI) this gives a full description of this joint actionObservation history.

Additional Inherited Members

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

Detailed Description

JointActionObservationHistory represents a joint action observation history.

Definition at line 42 of file JointActionObservationHistory.h.

Constructor & Destructor Documentation

JointActionObservationHistory::JointActionObservationHistory ( PlanningUnitMADPDiscrete pu)

Member Function Documentation

virtual JointActionObservationHistory* JointActionObservationHistory::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Implements History.

Definition at line 110 of file JointActionObservationHistory.h.

References JointActionObservationHistory().

const std::vector<Index>& JointActionObservationHistory::GetIndividualActionObservationHistoryIndices ( ) const
inline

Returns the indices of the indiv. action observation histories.

Definition at line 85 of file JointActionObservationHistory.h.

References _m_individualActionObservationHistories.

Referenced by JointActionObservationHistory().

Index JointActionObservationHistory::GetJointActionIndex ( ) const
inline

Gets the last joint action index.

Definition at line 103 of file JointActionObservationHistory.h.

References _m_jaI.

void JointActionObservationHistory::GetJointActionObservationHistoryVectors ( std::vector< Index > &  jaIs,
std::vector< Index > &  joIs 
)

Get vectors of joint action and observation indices stored by this history.

Definition at line 157 of file JointActionObservationHistory.cpp.

References GetJointActionObservationHistoryVectorsRecursive(), SoftPrint(), and PrintTools::SoftPrintVector().

void JointActionObservationHistory::GetJointActionObservationHistoryVectorsRecursive ( std::vector< Index > &  jaIs,
std::vector< Index > &  joIs 
)
private
Index JointActionObservationHistory::GetJointObservationIndex ( ) const
inline

Gets the last joint observation index.

Definition at line 106 of file JointActionObservationHistory.h.

References _m_joI.

void JointActionObservationHistory::Print ( ) const
inlinevirtual
string JointActionObservationHistory::SoftPrintJointIndices ( ) const

Member Data Documentation

std::vector<Index> JointActionObservationHistory::_m_individualActionObservationHistories
private

A vector of Indices which are the indices of individual ActionObservationHistories this gives an alternate description of the current JointActionObservation History.

Definition at line 60 of file JointActionObservationHistory.h.

Referenced by GetIndividualActionObservationHistoryIndices(), and JointActionObservationHistory().

Index JointActionObservationHistory::_m_jaI
private
Index JointActionObservationHistory::_m_joI
private
JointActionObservationHistory* JointActionObservationHistory::_m_pred
private

The predecessor together with the last joint actionObservation (_m_actionObservationI) this gives a full description of this joint actionObservation history.

Definition at line 55 of file JointActionObservationHistory.h.

Referenced by GetJointActionObservationHistoryVectorsRecursive(), JointActionObservationHistory(), SoftPrint(), and SoftPrintJointIndices().


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