MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
JPolComponent_VectorImplementation.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _JPOLCOMPONENT_VECTORIMPLEMENTATION_H_
30
#define _JPOLCOMPONENT_VECTORIMPLEMENTATION_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
#include "
PolicyPureVector.h
"
35
36
class
Interface_ProblemToPolicyDiscretePure
;
37
40
class
JPolComponent_VectorImplementation
41
{
42
private
:
45
void
ClearIndividualPolicies
();
47
49
Index
*
_m_indivActionIndices
;
50
52
void
PrivClone
(
const
JPolComponent_VectorImplementation
& o);
53
54
const
Interface_ProblemToPolicyDiscretePure
*
_m_PTPDP
;
55
IndexDomainCategory
_m_idc
;
56
57
void
Construct
(
58
const
Interface_ProblemToPolicyDiscretePure
& pu,
59
PolicyGlobals::IndexDomainCategory
idc,
60
size_t
depth);
61
62
protected
:
63
std::vector<PolicyPureVector*>
_m_indivPols_PolicyPureVector
;
64
65
public
:
66
// Constructor, destructor and copy assignment.
68
JPolComponent_VectorImplementation
(
69
const
Interface_ProblemToPolicyDiscretePure
& pu,
70
size_t
depth=
MAXHORIZON
);
71
72
JPolComponent_VectorImplementation
(
73
const
Interface_ProblemToPolicyDiscretePure
& pu,
74
PolicyGlobals::IndexDomainCategory
idc,
75
size_t
depth=
MAXHORIZON
);
76
78
JPolComponent_VectorImplementation
(
79
const
JPolComponent_VectorImplementation
& a);
80
82
~JPolComponent_VectorImplementation
();
84
JPolComponent_VectorImplementation
&
operator=
(
const
85
JPolComponent_VectorImplementation
& o);
87
88
bool
operator++
()
89
{
return
( this->
Increment
() ); };
90
92
LIndex
GetIndex
()
const
;
93
95
97
std::vector<PolicyPureVector*>&
GetIndividualPolicies
()
98
{
return
_m_indivPols_PolicyPureVector
;};
99
100
virtual
PolicyDiscrete
*
GetIndividualPolicyDiscrete
(
Index
agI)
const
101
{
return
_m_indivPols_PolicyPureVector
.at(agI); }
102
104
void
SetIndex
(
LIndex
i);
105
106
//data manipulation (set) functions:
108
void
RandomInitialization
();
110
void
RandomInitialization
(
Index
agentI);
112
114
void
ZeroInitialization
();
116
118
void
ZeroInitialization
(
Index
agentI);
119
120
122
bool
Increment
(
Index
agentI)
123
{
return
( ++(*
_m_indivPols_PolicyPureVector
[agentI])) ;};
125
bool
Increment
();
126
127
void
SetDepthForIndivPols
(
size_t
d);
128
130
void
SetAction
(
Index
agentI,
Index
domainI,
Index
aI)
131
{
_m_indivPols_PolicyPureVector
[agentI]->SetAction(domainI, aI);}
132
134
std::string
SoftPrint
()
const
;
135
std::string
SoftPrintBrief
()
const
;
136
137
139
Index
GetJointActionIndex
(
Index
i)
const
;
141
Index
GetActionIndex
(
Index
aI,
Index
domainI)
const
142
{
return
_m_indivPols_PolicyPureVector
[aI]->GetActionIndex(domainI);}
143
144
145
146
147
};
148
149
150
#endif
/* !_JPOLCOMPONENT_VECTORIMPLEMENTATION_H_ */
151
152
// Local Variables: ***
153
// mode:c++ ***
154
// End: ***
src
support
JPolComponent_VectorImplementation.h
Generated on Mon Sep 23 2013 14:50:06 for MultiAgentDecisionProcess by
1.8.1.2