MultiAgentDecisionProcess  Release 0.2.1
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"
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...
40 //class BGIP_SolverAlternatingMaximization;
41 
44 template<class JP>
46 {
47  private:
48  size_t _m_nrRestarts;
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  {}
66 
67  //operators:
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(
77  bg,
79  _m_verbose,
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: ***