MultiAgentDecisionProcess  Release 0.2.1
ObservationModelMapping.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _OBSERVATIONMODELMAPPING_H_
30 #define _OBSERVATIONMODELMAPPING_H_ 1
31 
32 /* the include directives */
33 #include <boost/numeric/ublas/matrix.hpp>
34 #include "Globals.h"
36 class OGet;
38 
40 
43 {
44 public:
45 
46  typedef boost::numeric::ublas::matrix<double> Matrix;
47 
48 private:
49 
50  std::vector<Matrix* > _m_O;
51 
52 protected:
53 
54 public:
55  // Constructor, destructor and copy assignment.
57  ObservationModelMapping(int nrS = 1, int nrJA = 1, int nrJO = 1);
58 
63 
65  double Get(Index ja_i, Index suc_s_i, Index jo_i) const
66  { return((*_m_O[ja_i])(suc_s_i,jo_i)); }
67 
68  //data manipulation funtions:
70 
75  void Set(Index ja_i, Index suc_s_i, Index jo_i, double prob)
76  { (*_m_O[ja_i])(suc_s_i,jo_i)=prob; }
77 
79  const Matrix* GetMatrixPtr(Index a) const
80  { return(_m_O.at(a)); }
81 
83  virtual ObservationModelMapping* Clone() const
84  { return new ObservationModelMapping(*this); }
85 
87 };
88 
89 #endif /* !_OBSERVATIONMODELMAPPING_H_*/
90 
91 // Local Variables: ***
92 // mode:c++ ***
93 // End: ***
94