MultiAgentDecisionProcess  Release 0.2.1
RewardModelTOISparse.h
Go to the documentation of this file.
1 
28 /* Only include this header file once. */
29 #ifndef _REWARDMODELTOISPARSE_H_
30 #define _REWARDMODELTOISPARSE_H_ 1
31 
32 /* the include directives */
33 #include "Globals.h"
34 #include <map>
35 
39 {
40 private:
41 
42  std::string _m_s_str;
43  std::string _m_ja_str;
44 
45  std::map<std::pair<std::vector<Index>,
46  std::vector<Index> >,
47  double> _m_R;
48 
49 protected:
50 
51 public:
52 
53  // Constructor, destructor and copy assignment.
62  RewardModelTOISparse(std::string s_str="s",
63  std::string ja_str="ja");
65  //RewardModelTOISparse(const RewardModelTOISparse&);
68 
70  double Get(const std::vector<Index> &sIs,
71  const std::vector<Index> &aIs) const;
72 #if 0
73  double Get(Index s_i, Index ja_i) const
74  {
75  return(GetReward(JointToIndividualStateIndices(s_i),
76  JointToIndividualActionIndices(ja_i)));
77  }
78 #endif
79  //data manipulation funtions:
81 
84  void Set(const std::vector<Index> &sIs,
85  const std::vector<Index> &aIs,
86  double reward);
87 
89  std::string SoftPrint() const;
91  void Print() const
92  { std::cout << SoftPrint();}
93 };
94 
95 #endif /* !_REWARDMODELTOISPARSE_H_*/
96 
97 // Local Variables: ***
98 // mode:c++ ***
99 // End: ***
100