MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
QTable.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _QTABLE_H_
30
#define _QTABLE_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
#include "
QTableInterface.h
"
35
#include <boost/numeric/ublas/matrix.hpp>
36
37
typedef
boost::numeric::ublas::matrix<double>
matrix_t
;
38
40
class
QTable
41
:
42
public
QTableInterface
43
,
public
matrix_t
44
{
45
private
:
46
47
protected
:
48
49
public
:
50
// Constructor, destructor and copy assignment.
52
QTable
()
53
{}
54
QTable
(
size_t
S,
size_t
A)
55
:
matrix_t
(S,A)
56
{}
58
QTable
(
const
QTable
& a)
59
:
matrix_t
(a)
60
{};
61
/*
63
~QTable();
64
*/
66
// QTable& operator= (const QTable& o);
67
68
virtual
double
Get
(
Index
s_i,
Index
ja_i)
const
69
{
return
this->operator() (s_i, ja_i); }
70
virtual
void
Set
(
Index
s_i,
Index
ja_i,
double
rew)
71
{ this->operator() (s_i, ja_i) = rew; }
72
74
virtual
QTable
*
Clone
()
const
75
{
return
new
QTable
(*
this
); }
76
77
};
78
80
typedef
std::vector<QTable>
QTables
;
81
82
#endif
/* !_QTABLE_H_ */
83
84
// Local Variables: ***
85
// mode:c++ ***
86
// End: ***
src
support
QTable.h
Generated on Mon Sep 23 2013 14:50:06 for MultiAgentDecisionProcess by
1.8.1.2