MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
PolicyPureVector.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _POLICYPUREVECTOR_H_
30
#define _POLICYPUREVECTOR_H_ 1
31
32
/* the include directives */
33
#include <iostream>
34
#include <cmath>
35
#include "
PolicyDiscretePure.h
"
36
#include "
ObservationHistoryTree.h
"
37
#include "
E.h
"
38
39
52
class
PolicyPureVector
:
public
PolicyDiscretePure
53
{
54
private
:
55
56
protected
:
58
Index
_m_agentI
;
61
std::vector<Index>
_m_domainToActionIndices
;
62
63
public
:
64
// Constructor, destructor and copy assignment.
65
// (default) Constructor
66
//PolicyPureVector();
70
PolicyPureVector
(
const
Interface_ProblemToPolicyDiscretePure
& pu,
71
Index
agentI,
72
PolicyGlobals::IndexDomainCategory
idc,
73
size_t
depth=
MAXHORIZON
);
75
PolicyPureVector
(
const
PolicyPureVector
& a);
77
virtual
~PolicyPureVector
();
78
virtual
PolicyPureVector
&
operator=
(
const
PolicyPureVector
& o);
79
80
//operators:
82
bool
operator++
() {
return
( this->
Increment
() ); };
83
85
LIndex
GetIndex
()
const
;
86
88
void
SetIndex
(
LIndex
i);
89
90
//data manipulation (set) functions:
92
94
void
ZeroInitialization
();
96
void
RandomInitialization
();
98
void
RandomInitialization
(
Index
agentI)
99
{
100
if
(agentI !=
_m_agentI
)
101
throw
E
(
"Error, agent index doesn't match."
);
102
RandomInitialization
();
103
}
104
106
109
bool
Increment
();
110
113
void
SetDepth
(
size_t
d);
114
116
void
SetAction
(
Index
ohI,
Index
aI)
117
{
_m_domainToActionIndices
.at(ohI) = aI;}
118
119
//get (data) functions:
120
123
Index
GetActionIndex
(
Index
oh)
const
124
{
return
(
_m_domainToActionIndices
[oh] ); }
125
127
virtual
PolicyPureVector
*
Clone
()
const
128
{
return
new
PolicyPureVector
(*
this
); }
129
131
std::string
SoftPrint
()
const
;
132
133
};
134
135
136
#endif
/* !_POLICYPUREVECTOR_H_ */
137
138
139
// Local Variables: ***
140
// mode:c++ ***
141
// End: ***
src
support
PolicyPureVector.h
Generated on Mon Sep 23 2013 14:50:06 for MultiAgentDecisionProcess by
1.8.1.2