MultiAgentDecisionProcess  Release 0.2.1
PartialJointPolicyPureVector.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _PARTIALJOINTPOLICYPUREVECTOR_H_
30 #define _PARTIALJOINTPOLICYPUREVECTOR_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
36 
41 // public JointPolicyPureVector , //<- don't use mutliple inheritance for code reuse..
43  private JPolComponent_VectorImplementation // use private inheritance for composition
44 {
45  private:
46 
47  protected:
48 
49  public:
50  // Constructor, destructor and copy assignment.
54  double pastReward = 0.0,
55  size_t depth = MAXHORIZON);
56 
59  :
62  {};
64  :
67  dynamic_cast<const PartialJointPolicyPureVector&>( a ) )
68  {};
69 
70 
74  virtual PartialJointPolicyPureVector& operator=
76  virtual PartialJointPolicyPureVector& operator=
78 
80 
81  void SetDepth(size_t d)
82  {
85  };
86 
88  virtual std::string SoftPrint() const;
90  virtual std::string SoftPrintBrief() const;
91  void PrintBrief() const
92  { std::cout << SoftPrintBrief();}
93 
97 
98  //relay the following functions to the JPolComponent_VectorImplementation:
99  //
100  bool operator++ ()
101  { return( this->Increment() ); };
102  bool Increment(Index agentI)
103  { return this->JPolComponent_VectorImplementation::Increment(agentI); }
104  bool Increment()
106 
107  LIndex GetIndex() const
109  void SetIndex(LIndex i)
111 
112  virtual Index GetJointActionIndex(Index i) const
114  virtual Index GetActionIndex(Index agI , Index domainI) const
116 
120 
122  std::vector<PolicyPureVector*>& GetIndividualPolicies()
124 
125  virtual void ZeroInitialization()
127  virtual void ZeroInitialization(Index i)
129  virtual void RandomInitialization()
131  virtual void RandomInitialization(Index i)
133  virtual void SetAction(Index agentI, Index domainI, Index aI)
134  { JPolComponent_VectorImplementation::SetAction(agentI, domainI, aI);}
135 
138  { return new PartialJointPolicyPureVector(*this); }
139 
140 };
141 
142 
143 #endif /* !_PARTIALJOINTPOLICYPUREVECTOR_H_ */
144 
145 // Local Variables: ***
146 // mode:c++ ***
147 // End: ***