MultiAgentDecisionProcess
|
JointActionDiscrete represents discrete joint actions. More...
#include <JointActionDiscrete.h>
Public Member Functions | |
void | AddIndividualAction (const ActionDiscrete *a, Index agentI) |
Adds an individual action for agentI to this joint action. More... | |
virtual JointActionDiscrete * | Clone () const |
Returns a pointer to a copy of this class. More... | |
void | DeleteIndividualActions () |
Deletes the individual actions to which this joint action points. More... | |
const std::vector< const ActionDiscrete * > & | GetIndividualActionDiscretes () const |
Get the ActionDiscretes for this joint action. More... | |
const std::vector< Index > & | GetIndividualActionDiscretesIndices () const |
Get the Action indices for this joint action. More... | |
JointActionDiscrete (Index index=INDEX_MAX) | |
(default) Constructor More... | |
JointActionDiscrete (Index index, std::vector< const ActionDiscrete * > a) | |
Constructor with an index and a vector of individual actions. More... | |
JointActionDiscrete (const JointActionDiscrete &a) | |
Copy constructor. More... | |
std::string | SoftPrint () const |
std::string | SoftPrintBrief () const |
virtual | ~JointActionDiscrete () |
Destructor. More... | |
Public Member Functions inherited from JointAction | |
virtual void | Print () const |
virtual void | PrintBrief () const |
virtual | ~JointAction () |
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... | |
Private Member Functions | |
std::vector< Index > | ConstructIndividualActionDiscretesIndices () const |
Constructs the vector of individual Action indices from _m_apVector. More... | |
Private Attributes | |
std::vector< Index > | _m_aIndexVector |
Pointers to the individual actions that make up this joint action. More... | |
std::vector< const ActionDiscrete * > | _m_apVector |
Indices of the individual actions that make up this joint action. More... | |
JointActionDiscrete represents discrete joint actions.
(default) Constructor
Referenced by Clone().
JointActionDiscrete::JointActionDiscrete | ( | Index | index, |
std::vector< const ActionDiscrete * > | a | ||
) |
Constructor with an index and a vector of individual actions.
References _m_aIndexVector, and ConstructIndividualActionDiscretesIndices().
JointActionDiscrete::JointActionDiscrete | ( | const JointActionDiscrete & | a | ) |
Copy constructor.
References _m_aIndexVector, _m_apVector, and DEBUG_JAD.
|
virtual |
Destructor.
References _m_apVector, and DEBUG_JAD.
void JointActionDiscrete::AddIndividualAction | ( | const ActionDiscrete * | a, |
Index | agentI | ||
) |
Adds an individual action for agentI to this joint action.
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 actions.
References _m_aIndexVector, _m_apVector, and DiscreteEntity::GetIndex().
Referenced by MADPComponentDiscreteActions::ConstructJointActionsRecursively(), TransitionObservationIndependentMADPDiscrete::CreateJointActionsRecursively(), and TransitionObservationIndependentMADPDiscrete::GetJointActionDiscrete().
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements JointAction.
References JointActionDiscrete().
|
private |
Constructs the vector of individual Action indices from _m_apVector.
References _m_apVector.
Referenced by JointActionDiscrete().
void JointActionDiscrete::DeleteIndividualActions | ( | ) |
Deletes the individual actions to which this joint action points.
This function will typically NOT be used: normally multiple joint actions share their individual actions...
References _m_apVector.
|
inline |
Get the ActionDiscretes for this joint action.
|
inline |
Get the Action indices for this joint action.
Referenced by TransitionObservationIndependentMADPDiscrete::JointToIndividualActionIndicesNoCache().
|
virtual |
Implements JointAction.
References _m_apVector, and DiscreteEntity::GetIndex().
|
virtual |
Implements JointAction.
References _m_apVector.
|
private |
Pointers to the individual actions that make up this joint action.
Referenced by AddIndividualAction(), and JointActionDiscrete().
|
private |
Indices of the individual actions that make up this joint action.
Referenced by AddIndividualAction(), ConstructIndividualActionDiscretesIndices(), DeleteIndividualActions(), JointActionDiscrete(), SoftPrint(), SoftPrintBrief(), and ~JointActionDiscrete().