MultiAgentDecisionProcess
Release 0.2.1
|
JointObservationDiscrete represents discrete joint observations. More...
#include <JointObservationDiscrete.h>
Public Member Functions | |
void | AddIndividualObservation (const ObservationDiscrete *a, Index agentI) |
Adds an individual observation for agentI to this joint observation. | |
virtual JointObservationDiscrete * | Clone () const |
Returns a pointer to a copy of this class. | |
const std::vector< const ObservationDiscrete * > & | GetIndividualObservationDiscretes () const |
Get the ObservationDiscretes for this joint action. | |
const std::vector< Index > & | GetIndividualObservationDiscretesIndices () const |
Get the Observation indices for this joint action. | |
JointObservationDiscrete (Index index=0) | |
(default) Constructor | |
JointObservationDiscrete (Index index, std::vector< const ObservationDiscrete * > a) | |
Constructor with an index and a vector of individual observations. | |
JointObservationDiscrete (const JointObservationDiscrete &a) | |
Copy constructor. | |
std::string | SoftPrint () const |
std::string | SoftPrintBrief () const |
~JointObservationDiscrete () | |
Destructor. | |
![]() | |
virtual void | Print () const |
virtual void | PrintBrief () const |
virtual | ~JointObservation () |
Destructor. | |
![]() | |
DiscreteEntity (Index i) | |
(default) Constructor | |
Index | GetIndex () const |
Return this DiscreteEntity's index. | |
bool | operator< (const DiscreteEntity &a) const |
The less (<) operator. This is needed to put DiscreteEntities in a set. | |
void | SetIndex (Index i) |
Set this DiscreteEntity's index. | |
virtual | ~DiscreteEntity () |
Destructor. |
Protected Member Functions | |
std::vector< Index > | ConstructIndividualObservationDiscretesIndices () const |
Constructs the vector of individual Observation indices from _m_apVector. |
Protected Attributes | |
std::vector< Index > | _m_oIndexVector |
Pointers to individual observations that make up this joint observation. | |
std::vector< const ObservationDiscrete * > | _m_opVector |
Indices of individual observations that make up this joint observation. | |
![]() | |
Index | _m_index |
The index of this discrete entity. |
JointObservationDiscrete represents discrete joint observations.
Definition at line 43 of file JointObservationDiscrete.h.
JointObservationDiscrete::JointObservationDiscrete | ( | Index | index = 0 | ) |
(default) Constructor
Definition at line 36 of file JointObservationDiscrete.cpp.
Referenced by Clone().
JointObservationDiscrete::JointObservationDiscrete | ( | Index | index, |
std::vector< const ObservationDiscrete * > | a | ||
) |
Constructor with an index and a vector of individual observations.
Definition at line 41 of file JointObservationDiscrete.cpp.
References _m_oIndexVector, and ConstructIndividualObservationDiscretesIndices().
JointObservationDiscrete::JointObservationDiscrete | ( | const JointObservationDiscrete & | a | ) |
Copy constructor.
Definition at line 51 of file JointObservationDiscrete.cpp.
References _m_oIndexVector, _m_opVector, and DEBUG_JOD.
JointObservationDiscrete::~JointObservationDiscrete | ( | ) |
Destructor.
Definition at line 68 of file JointObservationDiscrete.cpp.
References _m_opVector, and DEBUG_JOD.
void JointObservationDiscrete::AddIndividualObservation | ( | const ObservationDiscrete * | a, |
Index | agentI | ||
) |
Adds an individual observation for agentI to this joint observation.
This has to be called ordered: i.e., first for agent 0, then for agent 1, etc. up to nrAgents. This function is also typically only used to construct the joint observations.
Definition at line 78 of file JointObservationDiscrete.cpp.
References _m_oIndexVector, _m_opVector, and DiscreteEntity::GetIndex().
Referenced by MADPComponentDiscreteObservations::ConstructJointObservationsRecursively(), TransitionObservationIndependentMADPDiscrete::ConstructJointObservationsRecursively(), and TransitionObservationIndependentMADPDiscrete::GetJointObservation().
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements JointObservation.
Definition at line 89 of file JointObservationDiscrete.h.
References JointObservationDiscrete().
|
protected |
Constructs the vector of individual Observation indices from _m_apVector.
Definition at line 124 of file JointObservationDiscrete.cpp.
References _m_opVector, and DEBUG_JOD.
Referenced by JointObservationDiscrete().
|
inline |
Get the ObservationDiscretes for this joint action.
Definition at line 82 of file JointObservationDiscrete.h.
References _m_opVector.
|
inline |
Get the Observation indices for this joint action.
Definition at line 85 of file JointObservationDiscrete.h.
References _m_oIndexVector.
|
virtual |
Implements JointObservation.
Definition at line 86 of file JointObservationDiscrete.cpp.
References _m_opVector, and DiscreteEntity::GetIndex().
|
virtual |
Implements JointObservation.
Definition at line 105 of file JointObservationDiscrete.cpp.
References _m_opVector.
|
protected |
Pointers to individual observations that make up this joint observation.
Definition at line 52 of file JointObservationDiscrete.h.
Referenced by AddIndividualObservation(), GetIndividualObservationDiscretesIndices(), and JointObservationDiscrete().
|
protected |
Indices of individual observations that make up this joint observation.
Definition at line 54 of file JointObservationDiscrete.h.
Referenced by AddIndividualObservation(), ConstructIndividualObservationDiscretesIndices(), GetIndividualObservationDiscretes(), JointObservationDiscrete(), SoftPrint(), SoftPrintBrief(), and ~JointObservationDiscrete().