MultiAgentDecisionProcess  Release 0.2.1
TGet.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _TGET_H_
30 #define _TGET_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 
35 #include "TransitionModelMapping.h"
37 
39 class TGet
40 {
41 public:
42  virtual ~TGet() = 0;
43  //get (data) functions:
44  virtual double Get(Index sI, Index jaI, Index sucSI) 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 TGet::~TGet() {}
50 
54 {
55 
56 private:
57  std::vector<TransitionModelMapping::Matrix* > _m_T;
58 public:
60  {
61  _m_T = tm->_m_T;
62  };
63 
64  virtual double Get(Index sI, Index jaI, Index sucSI) const
65  { { return((*_m_T[jaI])(sI,sucSI)); } }
66 
67 };
68 
72 {
73 
74 private:
75  std::vector<TransitionModelMappingSparse::SparseMatrix* > _m_T;
76 public:
78  {
79  _m_T = tm->_m_T;
80  };
81 
82  virtual double Get(Index sI, Index jaI, Index sucSI) const
83  { { return((*_m_T[jaI])(sI,sucSI)); } }
84 
85 };
86 
87 #endif /* !_TGET_H_ */
88 
89 // Local Variables: ***
90 // mode:c++ ***
91 // End: ***