TransitionModelMappingSparse Class Reference

TransitionModelMappingSparse implements a TransitionModelDiscrete. More...

#include <TransitionModelMappingSparse.h>

Inheritance diagram for TransitionModelMappingSparse:

Public Types

< double > 

Public Member Functions

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

Private Attributes

std::vector< SparseMatrix * > _m_T


class TGet_TransitionModelMappingSparse

Detailed Description

TransitionModelMappingSparse implements a TransitionModelDiscrete.

Uses sparse matrices.

Member Typedef Documentation

typedef boost::numeric::ublas::compressed_matrix<double> TransitionModelMappingSparse::SparseMatrix

Constructor & Destructor Documentation

TransitionModelMappingSparse::TransitionModelMappingSparse ( int  nrS = 1,
int  nrJA = 1 

default Constructor

References _m_T.

Referenced by Clone().

TransitionModelMappingSparse::TransitionModelMappingSparse ( const TransitionModelMappingSparse TM)

Copy constructor.

References _m_T.

TransitionModelMappingSparse::~TransitionModelMappingSparse ( )


References _m_T.

Member Function Documentation

virtual TransitionModelMappingSparse* TransitionModelMappingSparse::Clone ( ) const

Returns a pointer to a copy of this class.

Implements TransitionModelDiscrete.

References TransitionModelMappingSparse().

double TransitionModelMappingSparse::Get ( Index  sI,
Index  jaI,
Index  sucSI 
) const

Returns P(s'|s,ja).

Implements TransitionModelDiscreteInterface.

const SparseMatrix* TransitionModelMappingSparse::GetMatrixPtr ( Index  a) const
void TransitionModelMappingSparse::Set ( Index  sI,
Index  jaI,
Index  sucSI,
double  prob 

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

Implements TransitionModelDiscreteInterface.

References Globals::PROB_PRECISION.

Friends And Related Function Documentation

friend class TGet_TransitionModelMappingSparse

Member Data Documentation