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