MultiAgentDecisionProcess  Release 0.2.1
JointPolicyDiscrete.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _JOINTPOLICYDISCRETE_H_
30 #define _JOINTPOLICYDISCRETE_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include <stdlib.h>
35 #include "Globals.h"
36 #include "JointPolicy.h"
38 #include "Referrer.h"
39 
40 
41 using namespace PolicyGlobals;
42 
43 class PolicyDiscrete;
59 {
60  private:
65 
66  protected:
67 
68  public:
69  // Constructor, destructor and copy assignment.
72  :
73  JointPolicy(0),
74  _m_PTPD(0)
75  {};
83  {};
85  virtual JointPolicyDiscrete& operator= (const JointPolicyDiscrete& o);
86 
87  //operators:
88 
89  //data manipulation (set) functions:
93  void SetIndexDomainCategory(IndexDomainCategory idc)
94  {_m_indexDomCat = idc;};
95 
96  //get (data) functions:
100  IndexDomainCategory GetIndexDomainCategory() const
101  {return (_m_indexDomCat);};
102 
103 
106  virtual PolicyDiscrete* GetIndividualPolicyDiscrete(Index agI) const = 0;
113  virtual double GetActionProb( Index agentI,
114  Index domI, Index aI ) const = 0;
115 
121  virtual double GetJointActionProb( Index i, Index ja ) const = 0;
122 
125  Index SampleJointAction( Index i ) const;
128  Index SampleJointAction( const std::vector<Index>& Is ) const;
131  void SampleJointActionVector(Index i, std::vector<Index>& jaVec ) const;
134  void SampleJointActionVector(
135  const std::vector<Index>& Is, std::vector<Index>& jaVec ) const;
136 
140  const Interface_ProblemToPolicyDiscrete* GetInterfacePTPDiscrete() const
141  {return _m_PTPD;}
144  void SetInterfacePTPDiscrete(const
146  {_m_PTPD = p;}
147 
149  size_t GetNrDomainElements(Index agentI) const
150  { return(GetInterfacePTPDiscrete()->GetNrPolicyDomainElements(agentI,
151  GetIndexDomainCategory() )); };
152 
154  virtual JointPolicyDiscrete* Clone() const = 0;
155 
156 };
157 
158 
159 #endif /* !_JOINTPOLICYDISCRETE_H_ */
160 
161 
162 // Local Variables: ***
163 // mode:c++ ***
164 // End: ***