MultiAgentDecisionProcess  Release 0.2.1
OGet.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _OGET_H_
30 #define _OGET_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 
37 
39 class OGet
40 {
41 public:
42  virtual ~OGet() = 0;
43  //get (data) functions:
44  virtual double Get(Index jaI, Index sucSI, Index joI) const = 0;
45 };
46 
47 //http://www.parashift.com/c++-faq-lite/pointers-to-members.html
48 //says "defined even though it's pure virtual; it's faster this way; trust me"
49 inline OGet::~OGet() {}
50 
54 {
55 
56 private:
57  std::vector<ObservationModelMapping::Matrix* > _m_O;
58 public:
60  {
61  _m_O = om->_m_O;
62  };
63 
64  virtual double Get(Index jaI, Index sucSI, Index joI) const
65  { { return((*_m_O[jaI])(sucSI,joI)); } }
66 
67 };
68 
72 {
73 
74 private:
75  std::vector<ObservationModelMappingSparse::SparseMatrix* > _m_O;
76 public:
78  {
79  _m_O = om->_m_O;
80  };
81 
82  virtual double Get(Index jaI, Index sucSI, Index joI) const
83  { { return((*_m_O[jaI])(sucSI,joI)); } }
84 
85 };
86 
87 #endif /* !_OGET_H_ */
88 
89 // Local Variables: ***
90 // mode:c++ ***
91 // End: ***