MultiAgentDecisionProcess
Release 0.2.1
Main Page
Namespaces
Classes
Files
File List
File Members
BGIP_SolverCreator_AM.h
Go to the documentation of this file.
1
28
/* Only include this header file once. */
29
#ifndef _BGIP_SOLVERCREATOR_AM_H_
30
#define _BGIP_SOLVERCREATOR_AM_H_ 1
31
32
/* the include directives */
33
#include "
Globals.h
"
34
#include "
BGIP_SolverCreatorInterface.h
"
35
36
//We have to include this (otherwise compiler doesn't know that
37
//BGIP_SolverAlternatingMaximization is-a BayesianGameIdenticalPayoffSolver
38
//and thus that the virtual function "operator()" is implemented...
39
#include "
BGIP_SolverAlternatingMaximization.h
"
40
//class BGIP_SolverAlternatingMaximization;
41
44
template
<
class
JP>
45
class
BGIP_SolverCreator_AM
:
public
BGIP_SolverCreatorInterface
<JP>
46
{
47
private
:
48
size_t
_m_nrRestarts
;
49
int
_m_verbose
;
50
size_t
_m_nrSolutions
;
51
52
protected
:
53
54
public
:
55
// Constructor, destructor and copy assignment.
57
BGIP_SolverCreator_AM
(
size_t
nrRestarts=10,
58
int
verbose=0,
59
size_t
nrSolutions=1)
60
:
61
_m_nrRestarts
(nrRestarts),
62
_m_verbose
(verbose),
63
_m_nrSolutions
(nrSolutions)
64
{}
65
virtual
~BGIP_SolverCreator_AM
(){};
66
67
//operators:
68
BGIP_SolverAlternatingMaximization<JP>
* operator()
69
(
const
BayesianGameIdenticalPayoffInterface
& bg)
const
70
{
71
if
(
_m_verbose
>= 2)
72
{
73
std::cout <<
"BGIP_SolverCreator_AM:: creating a new BGIP_SolverAlternatingMaximization with nrRestarts="
<<
_m_nrRestarts
<<
", verbose="
<<
_m_verbose
<<
", nrSols="
<<
_m_nrSolutions
<< std::endl;
74
}
75
return
(
76
new
BGIP_SolverAlternatingMaximization<JP>
(
77
bg,
78
_m_nrRestarts
,
79
_m_verbose
,
80
_m_nrSolutions
81
)
82
);
83
}
84
85
86
//data manipulation (set) functions:
87
88
//get (data) functions:
89
std::string
SoftPrint
()
const
90
{
91
std::stringstream ss;
92
ss <<
"BGIP_SolverCreator_AM object with "
<<
93
", _m_verbose="
<<
_m_verbose
<<
94
", _m_nrSolutions="
<<
_m_nrSolutions
<<
95
", _m_nrRestarts="
<<
_m_nrRestarts
<<
96
std::endl;
97
return
(ss.str());
98
}
99
100
};
101
102
103
#endif
/* !_BGIP_SOLVERCREATOR_AM_H_ */
104
105
// Local Variables: ***
106
// mode:c++ ***
107
// End: ***
src
planning
BGIP_SolverCreator_AM.h
Generated on Mon Sep 23 2013 14:50:05 for MultiAgentDecisionProcess by
1.8.1.2