MultiAgentDecisionProcess
Release 0.2.1
|
RewardModelMappingSparse represents a discrete reward model. More...
#include <RewardModelMappingSparse.h>
Public Member Functions | |
virtual RewardModelMappingSparse * | Clone () const |
Returns a pointer to a copy of this class. | |
double | Get (Index s_i, Index ja_i) const |
Returns R(s,ja) | |
void | Print () const |
Print this to cout. | |
RewardModelMappingSparse (size_t nrS=1, size_t nrJA=1, std::string s_str="s", std::string ja_str="ja") | |
default Constructor nrS - number of states nrJA - number of joint actions s_str - how to call a state (For example you can use this class to create a mapping from observation histories and ja's to reals. | |
void | Set (Index s_i, Index ja_i, double rew) |
Sets R(s_i,ja_i) | |
std::string | SoftPrint () const |
Prints a description of this to a string. | |
~RewardModelMappingSparse () | |
Copy constructor. | |
![]() | |
RewardModel (size_t nrS=1, size_t nrJA=1) | |
default Constructor | |
virtual | ~RewardModel () |
Destructor. | |
![]() | |
virtual | ~QTableInterface () |
Private Types | |
typedef boost::numeric::ublas::compressed_matrix < double > | SparseMatrix |
Private Attributes | |
std::string | _m_ja_str |
SparseMatrix | _m_R |
std::string | _m_s_str |
Friends | |
class | RGet_RewardModelMappingSparse |
Additional Inherited Members | |
![]() | |
size_t | _m_nrJointActions |
The number of joint actions. | |
size_t | _m_nrStates |
The number of states. |
RewardModelMappingSparse represents a discrete reward model.
Definition at line 38 of file RewardModelMappingSparse.h.
|
private |
Definition at line 48 of file RewardModelMappingSparse.h.
RewardModelMappingSparse::RewardModelMappingSparse | ( | size_t | nrS = 1 , |
size_t | nrJA = 1 , |
||
std::string | s_str = "s" , |
||
std::string | ja_str = "ja" |
||
) |
default Constructor nrS - number of states nrJA - number of joint actions s_str - how to call a state (For example you can use this class to create a mapping from observation histories and ja's to reals.
Then this argument could be "joh") ja_str - idem for the joint actions
Definition at line 32 of file RewardModelMappingSparse.cpp.
References _m_ja_str, and _m_s_str.
Referenced by Clone().
RewardModelMappingSparse::~RewardModelMappingSparse | ( | ) |
|
inlinevirtual |
Returns a pointer to a copy of this class.
Implements RewardModel.
Definition at line 92 of file RewardModelMappingSparse.h.
References RewardModelMappingSparse().
|
inlinevirtual |
Returns R(s,ja)
Implements RewardModel.
Definition at line 76 of file RewardModelMappingSparse.h.
References _m_R.
Referenced by SoftPrint().
|
inline |
Print this to cout.
Reimplemented from RewardModel.
Definition at line 98 of file RewardModelMappingSparse.h.
References SoftPrint().
|
inlinevirtual |
Sets R(s_i,ja_i)
Index ja_i, Index s_i, are indices of the state and taken joint action. r is the reward. The order of events is s, ja, so is the arg. list.
Implements RewardModel.
Definition at line 84 of file RewardModelMappingSparse.h.
References _m_R, and Globals::REWARD_PRECISION.
|
virtual |
Prints a description of this to a string.
Implements RewardModel.
Definition at line 45 of file RewardModelMappingSparse.cpp.
References _m_ja_str, RewardModel::_m_nrJointActions, RewardModel::_m_nrStates, _m_s_str, and Get().
Referenced by Print().
|
friend |
Definition at line 101 of file RewardModelMappingSparse.h.
|
private |
Definition at line 43 of file RewardModelMappingSparse.h.
Referenced by RewardModelMappingSparse(), and SoftPrint().
|
private |
Definition at line 54 of file RewardModelMappingSparse.h.
|
private |
Definition at line 42 of file RewardModelMappingSparse.h.
Referenced by RewardModelMappingSparse(), and SoftPrint().