MultiAgentDecisionProcess  Release 0.2.1
JPolComponent_VectorImplementation.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _JPOLCOMPONENT_VECTORIMPLEMENTATION_H_
30 #define _JPOLCOMPONENT_VECTORIMPLEMENTATION_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 #include "PolicyPureVector.h"
35 
37 
41 {
42  private:
47 
50 
53 
56 
57  void Construct(
60  size_t depth);
61 
62  protected:
63  std::vector<PolicyPureVector*> _m_indivPols_PolicyPureVector;
64 
65  public:
66  // Constructor, destructor and copy assignment.
70  size_t depth=MAXHORIZON);
71 
75  size_t depth=MAXHORIZON);
76 
80 
87 
88  bool operator++ ()
89  { return( this->Increment() ); };
90 
92  LIndex GetIndex() const;
93 
95 
97  std::vector<PolicyPureVector*>& GetIndividualPolicies()
99 
101  { return _m_indivPols_PolicyPureVector.at(agI); }
102 
104  void SetIndex(LIndex i);
105 
106  //data manipulation (set) functions:
108  void RandomInitialization();
110  void RandomInitialization(Index agentI);
112 
114  void ZeroInitialization();
116 
118  void ZeroInitialization(Index agentI);
119 
120 
122  bool Increment(Index agentI)
123  {return( ++(*_m_indivPols_PolicyPureVector[agentI])) ;};
125  bool Increment();
126 
127  void SetDepthForIndivPols(size_t d);
128 
130  void SetAction(Index agentI, Index domainI, Index aI)
131  {_m_indivPols_PolicyPureVector[agentI]->SetAction(domainI, aI);}
132 
134  std::string SoftPrint() const;
135  std::string SoftPrintBrief() const;
136 
137 
141  Index GetActionIndex(Index aI, Index domainI) const
142  {return _m_indivPols_PolicyPureVector[aI]->GetActionIndex(domainI);}
143 
144 
145 
146 
147 };
148 
149 
150 #endif /* !_JPOLCOMPONENT_VECTORIMPLEMENTATION_H_ */
151 
152 // Local Variables: ***
153 // mode:c++ ***
154 // End: ***