MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
RGet.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _RGET_H_
30
#define _RGET_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
35
#include "
RewardModelMapping.h
"
36
#include "
RewardModelMappingSparse.h
"
37
40
class
RGet
41
{
42
public
:
43
virtual
~RGet
() = 0;
44
//get (data) functions:
45
virtual
double
Get
(
Index
sI,
Index
jaI)
const
= 0;
46
};
47
48
//http://www.parashift.com/c++-faq-lite/pointers-to-members.html
49
//says "defined even though it's pure virtual; it's faster this way; trust me"
50
inline
RGet::~RGet
() {}
51
54
class
RGet_RewardModelMapping
:
public
RGet
55
{
56
57
private
:
58
const
RewardModelMapping::Matrix
&
_m_R
;
59
public
:
60
RGet_RewardModelMapping
(
RewardModelMapping
* rm)
61
:
62
_m_R
( rm->
_m_R
)
63
{};
64
65
virtual
double
Get
(
Index
sI,
Index
jaI)
const
66
{
67
return
(
_m_R
(sI,jaI)) ;
68
}
69
};
70
73
class
RGet_RewardModelMappingSparse
:
public
RGet
74
{
75
76
private
:
77
78
const
RewardModelMappingSparse::SparseMatrix
&
_m_R
;
79
public
:
80
RGet_RewardModelMappingSparse
(
RewardModelMappingSparse
* rm)
81
:
82
_m_R
( rm->
_m_R
)
83
{};
84
85
virtual
double
Get
(
Index
sI,
Index
jaI)
const
86
{
87
return
(
_m_R
(sI,jaI)) ;
88
}
89
90
91
};
92
93
#endif
/* !_RGET_H_ */
94
95
// Local Variables: ***
96
// mode:c++ ***
97
// End: ***
src
base
RGet.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2