MultiAgentDecisionProcess  Release 0.2.1
JointPolicyPureVector.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _JOINTPOLICYPUREVECTOR_H_
30 #define _JOINTPOLICYPUREVECTOR_H_ 1
31 
32 /* the include directives */
33 #include <iostream>
34 #include <vector>
35 #include "Globals.h"
38 
39 
41 
52  //virtual <- this leads to pain in the ass...
54  private JPolComponent_VectorImplementation // use private inheritance for composition
55 
56 {
57  private:
58 
62 
64 
67 
68  protected:
69  std::vector<PolicyPureVector*> _m_indivPols_PolicyPureVector;
70 
71  public:
72  // Constructor, destructor and copy assignment.
73 
83  :
84  JointPolicyDiscretePure( pu , pu.GetDefaultIndexDomCat() ),
85  JPolComponent_VectorImplementation(pu, pu.GetDefaultIndexDomCat() )
86  {};
98  :
99  JointPolicyDiscretePure(pu, idc),
101  {};
102 
105  :
108  {};
111  :
114  dynamic_cast<const JointPolicyPureVector&>( a ) )
115  {};
119  :
122  {};
123  private:
124  public:
133 
135 
136  void SetDepth(size_t d)
137  {
140  };
141 
143  virtual std::string SoftPrint() const;
145  virtual std::string SoftPrintBrief() const;
146  void PrintBrief() const
147  { std::cout << SoftPrintBrief();}
148 
152 
153  //relay the following functions to the JPolComponent_VectorImplementation:
154 
156  bool operator++ () { return( this->Increment() ); };
157 
158  bool Increment(Index agentI)
159  { return this->JPolComponent_VectorImplementation::Increment(agentI); }
160  bool Increment()
162 
164  LIndex GetIndex() const
167  void SetIndex(LIndex i)
169 
170 
172  virtual Index GetJointActionIndex(Index i) const
175  virtual Index GetActionIndex(Index agI , Index domainI) const
177 
181 
183  std::vector<PolicyPureVector*>& GetIndividualPolicies()
185 
187 
189  virtual void ZeroInitialization()
192 
194  virtual void ZeroInitialization(Index i)
197  virtual void RandomInitialization()
200  virtual void RandomInitialization(Index i)
202  virtual void SetAction(Index agentI, Index domainI, Index aI)
203  { JPolComponent_VectorImplementation::SetAction(agentI, domainI, aI);}
204 
206  virtual JointPolicyPureVector* Clone() const
207  { return new JointPolicyPureVector(*this); }
208 
209 
210 
211 };
212 
213 
214 #endif /* !_JOINTPOLICYPUREVECTOR_H_ */
215 
216 
217 // Local Variables: ***
218 // mode:c++ ***
219 ;// End: ***