MultiAgentDecisionProcess
Release 0.2.1
|
JointObservationHistory represents a joint observation history. More...
#include <JointObservationHistory.h>
Public Member Functions | |
virtual JointObservationHistory * | Clone () 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. | |
![]() | |
PlanningUnitMADPDiscrete * | GetReferred () 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. | |
![]() | |
JointHistory () | |
(default) Constructor | |
virtual | ~JointHistory () |
Destructor. | |
![]() | |
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 | |
![]() | |
size_t | _m_length |
How long (how many time-steps) is this history? |
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.
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 | ||
) |
Creates a observation history specifying jObsI for the last joint observation and pred as the preceeding JointObservationHistory.
Definition at line 53 of file JointObservationHistory.cpp.
References _m_containsEmptyJOI, _m_individualObservationHistories, _m_jointObservationI, _m_pred, History::GetLength(), Referrer< PlanningUnitMADPDiscrete >::GetReferred(), ObservationHistoryTree::GetSuccessor(), and History::SetLength().
JointObservationHistory::JointObservationHistory | ( | const JointObservationHistory & | a | ) |
Copy constructor.
Definition at line 83 of file JointObservationHistory.cpp.
JointObservationHistory::~JointObservationHistory | ( | ) |
Destructor.
Definition at line 89 of file JointObservationHistory.cpp.
References _m_individualObservationHistories, DEBUG_JOH, and Print().
|
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.
|
inline |
Returns the index of the last received joint observation.
Definition at line 93 of file JointObservationHistory.h.
References _m_jointObservationI.
|
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 |
SoftPrints the joint observation history.
Definition at line 101 of file JointObservationHistory.cpp.
References _m_containsEmptyJOI, _m_jointObservationI, History::_m_length, _m_pred, PlanningUnitMADPDiscrete::GetJointObservation(), Referrer< PlanningUnitMADPDiscrete >::GetReferred(), SoftPrint(), and JointObservation::SoftPrintBrief().
Referenced by Print(), and SoftPrint().
|
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().
|
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().
|
private |
The last joint observation (index).
Definition at line 53 of file JointObservationHistory.h.
Referenced by GetJointObservationIndex(), JointObservationHistory(), and SoftPrint().
|
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().