MultiAgentDecisionProcess
JointObservationDiscrete Class Reference

JointObservationDiscrete represents discrete joint observations. More...

#include <JointObservationDiscrete.h>

Inheritance diagram for JointObservationDiscrete:
[legend]

Public Member Functions

void AddIndividualObservation (const ObservationDiscrete *a, Index agentI)
 Adds an individual observation for agentI to this joint observation. More...
 
virtual JointObservationDiscreteClone () const
 Returns a pointer to a copy of this class. More...
 
const std::vector< const
ObservationDiscrete * > & 
GetIndividualObservationDiscretes () const
 Get the ObservationDiscretes for this joint action. More...
 
const std::vector< Index > & GetIndividualObservationDiscretesIndices () const
 Get the Observation indices for this joint action. More...
 
 JointObservationDiscrete (Index index=INDEX_MAX)
 (default) Constructor More...
 
 JointObservationDiscrete (Index index, std::vector< const ObservationDiscrete * > a)
 Constructor with an index and a vector of individual observations. More...
 
 JointObservationDiscrete (const JointObservationDiscrete &a)
 Copy constructor. More...
 
std::string SoftPrint () const
 
std::string SoftPrintBrief () const
 
virtual ~JointObservationDiscrete ()
 Destructor. More...
 
- Public Member Functions inherited from JointObservation
virtual void Print () const
 
virtual void PrintBrief () const
 
virtual ~JointObservation ()
 Destructor. More...
 
- Public Member Functions inherited from DiscreteEntity
 DiscreteEntity (Index i=INDEX_MAX)
 (default) Constructor More...
 
Index GetIndex () const
 Return this DiscreteEntity's index. More...
 
bool operator< (const DiscreteEntity &a) const
 The less (<) operator. This is needed to put DiscreteEntities in a set. More...
 
void SetIndex (Index i)
 Set this DiscreteEntity's index. More...
 
virtual ~DiscreteEntity ()
 Destructor. More...
 

Protected Member Functions

std::vector< IndexConstructIndividualObservationDiscretesIndices () const
 Constructs the vector of individual Observation indices from _m_apVector. More...
 

Protected Attributes

std::vector< Index_m_oIndexVector
 Indices of individual observations that make up this joint observation. More...
 
std::vector< const
ObservationDiscrete * > 
_m_opVector
 Pointers to individual observations that make up this joint observation. More...
 

Detailed Description

JointObservationDiscrete represents discrete joint observations.

Constructor & Destructor Documentation

JointObservationDiscrete::JointObservationDiscrete ( Index  index = INDEX_MAX)

(default) Constructor

Referenced by Clone().

JointObservationDiscrete::JointObservationDiscrete ( Index  index,
std::vector< const ObservationDiscrete * >  a 
)

Constructor with an index and a vector of individual observations.

References _m_oIndexVector, and ConstructIndividualObservationDiscretesIndices().

JointObservationDiscrete::JointObservationDiscrete ( const JointObservationDiscrete a)

Copy constructor.

References _m_oIndexVector, _m_opVector, and DEBUG_JOD.

JointObservationDiscrete::~JointObservationDiscrete ( )
virtual

Destructor.

References _m_opVector, and DEBUG_JOD.

Member Function Documentation

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.

References _m_oIndexVector, _m_opVector, and DiscreteEntity::GetIndex().

Referenced by MADPComponentDiscreteObservations::ConstructJointObservationsRecursively(), TransitionObservationIndependentMADPDiscrete::ConstructJointObservationsRecursively(), and TransitionObservationIndependentMADPDiscrete::GetJointObservation().

virtual JointObservationDiscrete* JointObservationDiscrete::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Implements JointObservation.

References JointObservationDiscrete().

vector< Index > JointObservationDiscrete::ConstructIndividualObservationDiscretesIndices ( ) const
protected

Constructs the vector of individual Observation indices from _m_apVector.

References _m_opVector, and DEBUG_JOD.

Referenced by JointObservationDiscrete().

const std::vector<const ObservationDiscrete*>& JointObservationDiscrete::GetIndividualObservationDiscretes ( ) const
inline

Get the ObservationDiscretes for this joint action.

References _m_opVector.

const std::vector<Index>& JointObservationDiscrete::GetIndividualObservationDiscretesIndices ( ) const
inline

Get the Observation indices for this joint action.

References _m_oIndexVector.

string JointObservationDiscrete::SoftPrint ( ) const
virtual
string JointObservationDiscrete::SoftPrintBrief ( ) const
virtual

Implements JointObservation.

References _m_opVector.

Member Data Documentation

std::vector<Index> JointObservationDiscrete::_m_oIndexVector
protected

Indices of individual observations that make up this joint observation.

Referenced by AddIndividualObservation(), GetIndividualObservationDiscretesIndices(), and JointObservationDiscrete().

std::vector<const ObservationDiscrete*> JointObservationDiscrete::_m_opVector
protected