MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
BayesianGame.cpp
Go to the documentation of this file.
1
28
#include "
BayesianGame.h
"
29
#include "
E.h
"
30
31
using namespace
std;
32
33
BayesianGame::BayesianGame
(
size_t
nrAgents,
const
vector<size_t> &nrActions,
34
const
vector<size_t> &nrTypes) :
35
BayesianGameBase
(nrAgents, nrActions, nrTypes)
36
{
37
//initialize the utility functions
38
RewardModelMapping
r(
_m_nrJTypes
,
_m_nrJA
,
"type"
,
"ja"
);
39
for
(
Index
i = 0; i <
_m_nrAgents
; i++)
40
_m_utilFuncs
.push_back(r);
//r is copied by value so we get independent
41
//copies in _m_utilFuncs.
42
43
}
44
//Copy assignment constructor.
45
BayesianGame::BayesianGame
(
const
BayesianGame
& o) :
46
BayesianGameBase
(o)
47
{
48
throw
E
(
"trying to copy construct a BayesianGame - not implemented. (is this necessary?)"
);
49
}
50
//Destructor
51
52
bool
BayesianGame::SetInitialized
(
bool
b)
53
{
54
//TODO implement checks
55
_m_initialized
= b;
56
return
(
true
);
57
}
58
59
void
BayesianGame::Print
()
const
60
{
61
BayesianGameBase::Print
();
62
63
cout <<
"Utility functions:"
<<endl;
64
for
(
Index
aI = 0; aI <
_m_nrAgents
; aI++)
65
{
66
cout <<
"Agent "
<<aI<<
":"
<<endl;
67
_m_utilFuncs
[aI].Print();
68
}
69
}
70
src
planning
BayesianGame.cpp
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2