MultiAgentDecisionProcess  Release 0.2.1
StateDistributionVector.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _STATEDISTRIBUTIONVECTOR_H_
30 #define _STATEDISTRIBUTIONVECTOR_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 #include "StateDistribution.h"
35 
36 
37 namespace {
38  typedef std::vector<double> SDV;
39 }
40 
44  public StateDistribution,
45  public SDV
46 {
47  private:
48 
49  protected:
50 
51  public:
52  // Constructor, destructor and copy assignment.
55  :
56  SDV()
57  {};
58 
61  :
62  SDV(a)
63  {};
65  :
66  SDV(a)
67  {};
72  {
73  if (this == &o) return *this; // Gracefully handle self assignment
74  this->SDV::operator=(o);
75  return *this;
76  }
78  {
79  if (this == &o) return *this; // Gracefully handle self assignment
80  this->SDV::operator=(o);
81  return *this;
82  }
83 
84  //operators:
85 
86  //data manipulation (set) functions:
87 
88  //get (data) functions:
89  virtual double GetProbability( Index sI) const
90  { return this->at(sI); }
91 
92  virtual std::vector<double> ToVectorOfDoubles() const
93  { return *this; }
94 
96  virtual StateDistributionVector* Clone() const
97  { return new StateDistributionVector(*this); }
98 
99  virtual std::string SoftPrint() const
100  { return SoftPrintVector( *((SDV*)this) ); }
101 };
102 
103 
104 #endif /* !_STATEDISTRIBUTIONVECTOR_H_ */
105 
106 // Local Variables: ***
107 // mode:c++ ***
108 // End: ***