MultiAgentDecisionProcess  Release 0.2.1
ObservationModelDiscrete Class Reference

ObservationModelDiscrete represents a discrete observation model. More...

#include <ObservationModelDiscrete.h>

+ Inheritance diagram for ObservationModelDiscrete:
+ Collaboration diagram for ObservationModelDiscrete:

Public Member Functions

virtual ObservationModelDiscreteClone () const =0
 Returns a pointer to a copy of this class.
virtual double Get (Index ja_i, Index suc_s_i, Index jo_i) const =0
 Returns P(jo|ja,s')
 ObservationModelDiscrete (int nrS=1, int nrJA=1, int nrJO=1)
 Constructor with the dimensions of the observation model.
Index SampleJointObservation (Index jaI, Index sucI)
 Sample a joint observation.
virtual void Set (Index ja_i, Index suc_s_i, Index jo_i, double prob)=0
 Sets P(o|ja,s')
std::string SoftPrint () const
 SoftPrints tabular observation model.
virtual ~ObservationModelDiscrete ()
 Destructor.
- Public Member Functions inherited from ObservationModel
 ObservationModel ()
 default Constructor
void Print () const
virtual ~ObservationModel ()
 Destructor.

Private Attributes

int _m_nrJointActions
 The number of joint actions.
int _m_nrJointObservations
 The number of joint observations.
int _m_nrStates
 The number of states.

Detailed Description

ObservationModelDiscrete represents a discrete observation model.

Definition at line 38 of file ObservationModelDiscrete.h.

Constructor & Destructor Documentation

ObservationModelDiscrete::ObservationModelDiscrete ( int  nrS = 1,
int  nrJA = 1,
int  nrJO = 1 
)

Constructor with the dimensions of the observation model.

Definition at line 34 of file ObservationModelDiscrete.cpp.

ObservationModelDiscrete::~ObservationModelDiscrete ( )
virtual

Destructor.

Definition at line 44 of file ObservationModelDiscrete.cpp.

Member Function Documentation

virtual ObservationModelDiscrete* ObservationModelDiscrete::Clone ( ) const
pure virtual

Returns a pointer to a copy of this class.

Implements ObservationModel.

Implemented in ObservationModelMappingSparse, and ObservationModelMapping.

virtual double ObservationModelDiscrete::Get ( Index  ja_i,
Index  suc_s_i,
Index  jo_i 
) const
pure virtual
Index ObservationModelDiscrete::SampleJointObservation ( Index  jaI,
Index  sucI 
)

Sample a joint observation.

Definition at line 65 of file ObservationModelDiscrete.cpp.

References _m_nrJointObservations, and Get().

Referenced by MultiAgentDecisionProcessDiscrete::SampleJointObservation().

virtual void ObservationModelDiscrete::Set ( Index  ja_i,
Index  suc_s_i,
Index  jo_i,
double  prob 
)
pure virtual

Sets P(o|ja,s')

Index jo_i, Index ja_i, Index suc_s_i, are indices of the joint observation, taken joint action and resulting successor state. prob is the probability. The order of events is ja, s', o, so is the arg. list

Implemented in ObservationModelMappingSparse, and ObservationModelMapping.

Referenced by TransitionObservationIndependentMADPDiscrete::CreateCentralizedFullModels(), TransitionObservationIndependentMADPDiscrete::CreateCentralizedSparseModels(), and MultiAgentDecisionProcessDiscrete::SetObservationProbability().

string ObservationModelDiscrete::SoftPrint ( ) const
virtual

SoftPrints tabular observation model.

Implements ObservationModel.

Definition at line 48 of file ObservationModelDiscrete.cpp.

References _m_nrJointActions, _m_nrJointObservations, _m_nrStates, and Get().

Referenced by MultiAgentDecisionProcessDiscrete::SoftPrint().

Member Data Documentation

int ObservationModelDiscrete::_m_nrJointActions
private

The number of joint actions.

Definition at line 45 of file ObservationModelDiscrete.h.

Referenced by SoftPrint().

int ObservationModelDiscrete::_m_nrJointObservations
private

The number of joint observations.

Definition at line 47 of file ObservationModelDiscrete.h.

Referenced by SampleJointObservation(), and SoftPrint().

int ObservationModelDiscrete::_m_nrStates
private

The number of states.

Definition at line 43 of file ObservationModelDiscrete.h.

Referenced by SoftPrint().


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