MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
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
"
36
#include "
TransitionModelMappingSparse.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
53
class
TGet_TransitionModelMapping
:
public
TGet
54
{
55
56
private
:
57
std::vector<TransitionModelMapping::Matrix* >
_m_T
;
58
public
:
59
TGet_TransitionModelMapping
(
TransitionModelMapping
* tm)
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
71
class
TGet_TransitionModelMappingSparse
:
public
TGet
72
{
73
74
private
:
75
std::vector<TransitionModelMappingSparse::SparseMatrix* >
_m_T
;
76
public
:
77
TGet_TransitionModelMappingSparse
(
TransitionModelMappingSparse
* tm)
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: ***
src
base
TGet.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2