MultiAgentDecisionProcess  Release 0.2.1
TransitionModelDiscrete Class Reference

TransitionModelDiscrete represents a discrete transition model. More...

#include <TransitionModelDiscrete.h>

+ Inheritance diagram for TransitionModelDiscrete:
+ Collaboration diagram for TransitionModelDiscrete:

Public Member Functions

virtual TransitionModelDiscreteClone () const =0
 Returns a pointer to a copy of this class.
virtual double Get (Index sI, Index jaI, Index sucSI) const =0
 Returns P(s'|s,ja).
Index SampleSuccessorState (Index sI, Index jaI)
 Sample a successor state.
virtual void Set (Index sI, Index jaI, Index sucSI, double prob)=0
 Sets P(s'|s,ja)
std::string SoftPrint () const
 SoftPrints tabular transition model.
 TransitionModelDiscrete (int nrS=1, int nrJA=1)
 Constructor with the dimensions of the transition model.
virtual ~TransitionModelDiscrete ()
- Public Member Functions inherited from TransitionModel
void Print () const
 TransitionModel ()
 default Constructor
virtual ~TransitionModel ()
 Destructor.

Private Attributes

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

Detailed Description

TransitionModelDiscrete represents a discrete transition model.

Definition at line 38 of file TransitionModelDiscrete.h.

Constructor & Destructor Documentation

TransitionModelDiscrete::TransitionModelDiscrete ( int  nrS = 1,
int  nrJA = 1 
)

Constructor with the dimensions of the transition model.

Definition at line 32 of file TransitionModelDiscrete.cpp.

TransitionModelDiscrete::~TransitionModelDiscrete ( )
virtual

Definition at line 38 of file TransitionModelDiscrete.cpp.

Member Function Documentation

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

Returns a pointer to a copy of this class.

Implements TransitionModel.

Implemented in TransitionModelMappingSparse, and TransitionModelMapping.

virtual double TransitionModelDiscrete::Get ( Index  sI,
Index  jaI,
Index  sucSI 
) const
pure virtual
Index TransitionModelDiscrete::SampleSuccessorState ( Index  sI,
Index  jaI 
)

Sample a successor state.

Definition at line 58 of file TransitionModelDiscrete.cpp.

References _m_nrStates, and Get().

Referenced by MultiAgentDecisionProcessDiscrete::SampleSuccessorState().

virtual void TransitionModelDiscrete::Set ( Index  sI,
Index  jaI,
Index  sucSI,
double  prob 
)
pure virtual

Sets P(s'|s,ja)

sI, jaI, sucSI, are indices of the state, * taken joint action and resulting successor state. prob is * the probability. The order of events is s, ja, s', so is the arg. list

Implemented in TransitionModelMappingSparse, and TransitionModelMapping.

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

string TransitionModelDiscrete::SoftPrint ( ) const
virtual

SoftPrints tabular transition model.

Implements TransitionModel.

Definition at line 42 of file TransitionModelDiscrete.cpp.

References _m_nrJointActions, _m_nrStates, and Get().

Referenced by MultiAgentDecisionProcessDiscrete::SoftPrint().

Member Data Documentation

int TransitionModelDiscrete::_m_nrJointActions
private

The number of joint actions.

Definition at line 45 of file TransitionModelDiscrete.h.

Referenced by SoftPrint().

int TransitionModelDiscrete::_m_nrStates
private

The number of states.

Definition at line 43 of file TransitionModelDiscrete.h.

Referenced by SampleSuccessorState(), and SoftPrint().


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