MultiAgentDecisionProcess  Release 0.2.1
JointPolicyDiscretePure.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _JOINTPOLICYDISCRETEPURE_H_
30 #define _JOINTPOLICYDISCRETEPURE_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include "Globals.h"
36 #include "JointActionDiscrete.h"
37 #include "JointPolicyDiscrete.h"
38 
40 class PolicyDiscretePure;
41 
48 {
49  private:
50 
51 
52  protected:
53 
54  public:
55  // Constructor, destructor and copy assignment.
65  {};
68 
69  //operators:
70 
71  //data manipulation (set) functions:
72 
73 
75  virtual void RandomInitialization() = 0;
77  virtual void RandomInitialization(Index agentI) = 0;
78 
79  //get (data) functions:
80 
84  {
85  //Referrer<Interface_ProblemToPolicyDiscretePure>::GetReferred();
89  dynamic_cast<const Interface_ProblemToPolicyDiscretePure*>(p);
90 // why not allow this to return 0 if not succeeded?
91 // if(pp==0)
92 // throw(E("JointPolicyDiscretePure::GetInterfacePTPDiscretePure() dynamic_cast failed"));
93 
94  return pp;
95  }
97  inline void SetInterfacePTPDiscretePure(
99 
101  virtual void SetAction(Index agentI, Index domainI, Index aI) =0;
102 
104  virtual Index GetJointActionIndex(Index i) const = 0;
106  virtual Index GetActionIndex(Index aI, Index domainI) const = 0;
107 
109 
115  double GetJointActionProb( Index i, Index ja ) const;
121  double GetActionProb( Index agentI, Index domI, Index aI ) const;
122 
124  virtual JointPolicyDiscretePure* Clone() const = 0;
125 
127  virtual std::string SoftPrint() const = 0;
128 
130  virtual std::string SoftPrintBrief() const = 0;
131 };
132 
133 
134 #endif /* !_JOINTPOLICYDISCRETEPURE_H_ */
135 
136 // Local Variables: ***
137 // mode:c++ ***
138 // End: ***