MultiAgentDecisionProcess  Release 0.2.1
RewardModelMapping Class Reference

RewardModelMapping represents a discrete reward model. More...

#include <RewardModelMapping.h>

+ Inheritance diagram for RewardModelMapping:
+ Collaboration diagram for RewardModelMapping:

Public Member Functions

virtual RewardModelMappingClone () 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.
 RewardModelMapping (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.
 ~RewardModelMapping ()
 Copy constructor.
- Public Member Functions inherited from RewardModel
 RewardModel (size_t nrS=1, size_t nrJA=1)
 default Constructor
virtual ~RewardModel ()
 Destructor.
- Public Member Functions inherited from QTableInterface
virtual ~QTableInterface ()

Private Types

typedef
boost::numeric::ublas::matrix
< double > 
Matrix

Private Attributes

std::string _m_ja_str
Matrix _m_R
std::string _m_s_str

Friends

class RGet_RewardModelMapping

Additional Inherited Members

- Protected Attributes inherited from RewardModel
size_t _m_nrJointActions
 The number of joint actions.
size_t _m_nrStates
 The number of states.

Detailed Description

RewardModelMapping represents a discrete reward model.

Definition at line 38 of file RewardModelMapping.h.

Member Typedef Documentation

typedef boost::numeric::ublas::matrix<double> RewardModelMapping::Matrix
private

Definition at line 45 of file RewardModelMapping.h.

Constructor & Destructor Documentation

RewardModelMapping::RewardModelMapping ( 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 RewardModelMapping.cpp.

References _m_ja_str, _m_R, and _m_s_str.

Referenced by Clone().

RewardModelMapping::~RewardModelMapping ( )

Copy constructor.

Destructor.

Definition at line 44 of file RewardModelMapping.cpp.

Member Function Documentation

virtual RewardModelMapping* RewardModelMapping::Clone ( ) const
inlinevirtual

Returns a pointer to a copy of this class.

Implements RewardModel.

Definition at line 81 of file RewardModelMapping.h.

References RewardModelMapping().

double RewardModelMapping::Get ( Index  s_i,
Index  ja_i 
) const
inlinevirtual

Returns R(s,ja)

Implements RewardModel.

Definition at line 69 of file RewardModelMapping.h.

References _m_R.

Referenced by BayesianGameIdenticalPayoff::GetUtility(), and SoftPrint().

void RewardModelMapping::Print ( ) const
inline

Print this to cout.

Reimplemented from RewardModel.

Definition at line 87 of file RewardModelMapping.h.

References SoftPrint().

void RewardModelMapping::Set ( Index  s_i,
Index  ja_i,
double  rew 
)
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 77 of file RewardModelMapping.h.

References _m_R.

Referenced by BayesianGameIdenticalPayoff::SetUtility().

string RewardModelMapping::SoftPrint ( ) const
virtual

Prints a description of this to a string.

Implements RewardModel.

Definition at line 48 of file RewardModelMapping.cpp.

References _m_ja_str, RewardModel::_m_nrJointActions, RewardModel::_m_nrStates, _m_s_str, and Get().

Referenced by Print().

Friends And Related Function Documentation

friend class RGet_RewardModelMapping
friend

Definition at line 90 of file RewardModelMapping.h.

Member Data Documentation

std::string RewardModelMapping::_m_ja_str
private

Definition at line 43 of file RewardModelMapping.h.

Referenced by RewardModelMapping(), and SoftPrint().

Matrix RewardModelMapping::_m_R
private

Definition at line 47 of file RewardModelMapping.h.

Referenced by Get(), RewardModelMapping(), and Set().

std::string RewardModelMapping::_m_s_str
private

Definition at line 42 of file RewardModelMapping.h.

Referenced by RewardModelMapping(), and SoftPrint().


The documentation for this class was generated from the following files: