MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
RewardModelMapping.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _REWARDMODELMAPPING_H_
30
#define _REWARDMODELMAPPING_H_ 1
31
32
/* the include directives */
33
#include <boost/numeric/ublas/matrix.hpp>
34
#include "
Globals.h
"
35
#include "
RewardModel.h
"
36
38
class
RewardModelMapping
:
public
RewardModel
39
{
40
private
:
41
42
std::string
_m_s_str
;
43
std::string
_m_ja_str
;
44
45
typedef
boost::numeric::ublas::matrix<double>
Matrix
;
46
47
Matrix
_m_R
;
48
49
protected
:
50
51
public
:
52
// Constructor, destructor and copy assignment.
61
RewardModelMapping
(
size_t
nrS = 1,
size_t
nrJA = 1, std::string s_str=
"s"
,
62
std::string ja_str=
"ja"
);
64
//RewardModelMapping(const RewardModelMapping&);
66
~RewardModelMapping
();
67
69
double
Get
(
Index
s_i,
Index
ja_i)
const
70
{
return
(
_m_R
(s_i,ja_i)); }
71
72
//data manipulation funtions:
74
77
void
Set
(
Index
s_i,
Index
ja_i,
double
rew)
78
{
_m_R
(s_i,ja_i)=rew; }
79
81
virtual
RewardModelMapping
*
Clone
()
const
82
{
return
new
RewardModelMapping
(*
this
); }
83
85
std::string
SoftPrint
()
const
;
87
void
Print
()
const
88
{ std::cout <<
SoftPrint
();}
89
90
friend
class
RGet_RewardModelMapping
;
91
};
92
93
#endif
/* !_REWARDMODELMAPPING_H_*/
94
95
// Local Variables: ***
96
// mode:c++ ***
97
// End: ***
98
src
base
RewardModelMapping.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2